Title This assignment requires you to develop two Python programs. One is a client, the other is the... Description This assignment requires you to develop two Python programs. One is a client, the other is the server.   Server The server should “register” x procedures that the client will be able to call. It will then bind to the address “localhost” and port 8000. This is the address and port that the server will listen to for requests. Note that if you have binding errors, you may use another port as your computer may have an application that is using 8000. Most of the time, however, this will work. Your server invocation must be in the following form: python server.py localhost 8000 These procedures to be supported are as follows: name – returns the name of the server which is passed on the commandline during server invocation help – returns a list of procedures that the server supports servertime – returns the current time at the server in 24 hour format. I.e. 13:00:01 add(x,y) – returns the sum of x and y sub(x,y) – returns x – y mult(x,y) – returns x * y div(x,y) – returns x/y Client The client is to connect to the server using the server’s address and the port that the server is listening on (see above). It then will exercise each of the supported procedures using the values 8 and 6 for the values x and y respectively. Your client invocation must be in the following form: python client.py host_address host_port 8 6 Where host_address and host_port are the address and port that the server is listening on. If you are using a single computer for server and client computers just use “localhost” for the address and the port used above. The 8 and the 6 are the values for x and y. Example Output Of Client: 8 * 6 is 48.0 8 / 6 is 1.3333333333333333 8 + 6 is 14.0 8 - 6 is 2.0 8 / 0 is Infinity 13:50:22

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter8: Advanced Method Concepts
Section: Chapter Questions
Problem 7RQ
icon
Related questions
Question
Title
This assignment requires you to develop two Python programs. One is a client, the other is the...
Description

This assignment requires you to develop two Python programs. One is a client, the other is the server.</o:p>

 

Server</o:p>

The server should “register” x procedures that the client will be able to call. It will then bind to the address “localhost” and port 8000. This is the address and port that the server will listen to for requests. Note that if you have binding errors, you may use another port as your computer may have an application that is using 8000. Most of the time, however, this will work. Your server invocation must be in the following form:</o:p>

python server.py localhost 8000
These procedures to be supported are as follows:</o:p>

name – returns the name of the server which is passed on the commandline during server invocation</o:p>

help – returns a list of procedures that the server supports</o:p>

servertime – returns the current time at the server in 24 hour format. I.e. 13:00:01</o:p>

add(x,y) – returns the sum of x and y</o:p>

sub(x,y) – returns x – y</o:p>

mult(x,y) – returns x * y</o:p>

div(x,y) – returns x/y</o:p>

Client</o:p>

The client is to connect to the server using the server’s address and the port that the server is listening on (see above). It then will exercise each of the supported procedures using the values 8 and 6 for the values x and y respectively. Your client invocation must be in the following form:</o:p>

python client.py host_address host_port 8 6</o:p>

Where host_address and host_port are the address and port that the server is listening on. If you are using a single computer for server and client computers just use “localhost” for the address and the port used above. The 8 and the 6 are the values for x and y.</o:p>

Example Output Of Client:</o:p>

8 * 6 is 48.0</o:p>

8 / 6 is 1.3333333333333333</o:p>

8 + 6 is 14.0</o:p>

8 - 6 is 2.0</o:p>

8 / 0 is Infinity</o:p>

13:50:22</o:p>

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr