Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

Heres a Python program that implements a TCP ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Communications and Networking

Authors: Behrouz A. Forouzan

5th edition

73376221, 978-0073376226

More Books

Students also viewed these Computer Network questions

Question

Why are protocols needed?

Answered: 1 week ago