Question: Write a TCP client server program to perform the following tasks: 1- The server must generate a random number between 1 and 100. 2- The

Write a TCP client server program to perform the following tasks:

1- The server must generate a random number between 1 and 100. 

2- The server must send the generated number to the client and ask the user if the number is prime or not

3- The client (the user) must send his/her answer to the server

4- The server checks the answer, if it is correct,  it congratulates the user and ask him another question

5- If the answer is wrong the server must send the client the same number until the client sends the correct answer.

6- The program stops when the client send "end" string to the server.

Step by Step Solution

3.37 Rating (141 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres a Python program that implements a TCP ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Network Questions!