Question: how do I write this assignment in python? (I know that I have asked this previously but my instructor has given us new information which

how do I write this assignment in python? (I know that I have asked this previously but my instructor has given us new information which I will notate within asterisks and bold with italics)

In this assignment you will create a UDP Quote of the Day (QOTD) Client and Server.

The client program should:

1. accept a host and port number from the command line or prompt the user for these values at startup

2. Request the QOTD from the specified host and port over UDP

3. Print out the resulting quote

The server program should: **for server we are hard coding to localhost**

1. accept a port number from the command line or prompt the user for this value at startup

2. Receive requests from any address

3. Reply to requests with the QOTD, This can be a single hard-coded quote. Extra Credit (2 points) rotate through 3 or more quotes

To test your client, try requesting the qotd from icarus.cs.weber.edu:2017 (You will need to be on campus or connected through the vpn or athena)

To test your sever, try requesting the qotd from your server using your client.

What happens in the following scenarios? Explain why you think you get the results you do.

Try running your client on your computer and running the server on icarus.cs.weber.edu

Try running your server on your computer and running the client on icarus.cs.weber.edu

Try running your client without first starting the server it should connect to.

**instructor has given us the following bare codes for the client and server**

how do I write this assignment in python? (I know that Ihave asked this previously but my instructor has given us new information

udo_Server_new.py Download udo_Server_new.py (633 Bytes) import socket import sys # Create a TCP/IP socket sock = socket.socket (socket.AF INET, socket. SOCK DGRAM) # Bind the socket t the p rt serveraddress = ('localhost', 10000) print (sys.stderr, 'starting up on s port %s' sock.bind (server_address) - server-address) while True: print (sys.stderr, 'nwaiting to receive message') data, address= sock.recvfrom (4096) 'received data) %s bytes from %s' t (len (data), address )) print (sys.stderr, print (sys.stderr, if data: sent sock.sendto (data, address) print (sys.stderr, 'sent %s bytes back t ts' t (sent, address))

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!