Question: A client-server application in python where the server is able to connect to multiple clients at the same time, when a client is connected to
A client-server application in python where the server is able to connect to multiple clients at the same time, when a client is connected to the server the server plays a doubling game with the client.
Rules of the doubling game:
the server sends the user a number and gives them 5 seconds to return the double of it.
If the correct answer is received within the 5 seconds a congratulations message alongside a new number is sent, otherwise a try again message will be sent alongside a new number.
If user couldn't reply within 5 seconds the server will consider it a failure.
The code needs to be as simple as possible, also it needs to be well explained through comments. Thanks.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
