USING PYTHON In a while loop: Client needs to take a number from the user Client will send this number to the server The server will display a message that he got this number from this specific client...




USING PYTHON



  • In a while loop:

    • Client needs to take a number from the user

    • Client will send this number to the server

    • The server will display a message that he got this number from this specific client (print IP address and port number of client)

    • The server will check if this nummber is odd or even or zero

    • The server will send the output of this check (even/odd/zero) to the client

    • The client will print the output of the check to the user

    • This while loop will break if the user enters 1000000



  • Please note that the port number of the client is assigned dynamically by OS



Screenshot of Server cmd:


C:\Users\Student\Desktop\Python codes>python TCPServer.py
The server is ready to receive
The number is:  22     is received from:  ('127.0.0.1', 12)
The number is:  5     is received from:  ('127.0.0.1', 12)




Screenshot of client 1 cmd:


C:\Users\Student\Desktop\Python codes>python TCPClient.py


Enter the number: 22


The number is even


Enter the number: 5


The number is odd


Enter the number: 1000000




Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here