Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

THIS IS MY 2ND PART OF MY CSET 3200 ASSIGNMENT. (10 points) Python CGl. Since yo

ID: 3588509 • Letter: T

Question

THIS IS MY 2ND PART OF MY CSET 3200 ASSIGNMENT.

(10 points) Python CGl. Since you have learned Python in CSET1100, it should be easier for you to develop python CGl instead of PHP CGI used in the book examples. Since the book didn't supply any CGl implementation details, I supply you a tutorial here: b. ri in Although the tutorial is well written, it used python 2.7 while our server is using python 3.0. In order for your CGI script to run correctly, you need to make two changes to the examples used in the tutorial when developing your own. Change the very first line from #!/usr/bin/python to#!/usr/bin/python$ Use () with every print statement. E.g. change print "Content- type:text/htmnn" to print ("Content-type:text/htmlrInrln" You may also check out the example I made here: http://et791.ni.utoledo.edu/hwang/form.html i. j. k.

Explanation / Answer

Solution :-

The Python- cgi code provided above from the link is written using python 2.7 version. To write this code in Python 3 we need to change little bit of syntax.

The below given code able to run on servers using Python 3.

The code in python 3 starts here.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

#!/usr/bin/python3

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------