Python Assignment

Due: Friday, 3/10, 11:59pm

Write your answers in pythonAssignment.txt. Make sure pythonAssignment.txt is a plain text file, not a Word or RTF document. Save pythonAssignment.txt and other assignment files to your UNIX account cs371/python/assignment directory. Run the submit.cs371 script.

1. Describe Python's equivalent of Perl's use strict; pragma (if it has an equivalent). Describe Python's equivalent of Perl's “-w” runtime option (if it has an equivalent). List the information source(s) you used in your answer.

2. Reproduce Perl exercise 4 in Python. Save it as roster_dictionary.py. (Even though the name of the script is roster_dictionary.py, you can choose to use a simple list instead of a dictionary.)

3. Reproduce Perl exercise 7 in Python. Save it as cssenews_lists.py.

4. (at least 50 words) What is the functional programming paradigm? Show and explain a code example of functional programming in Python. List the information sources you used in your answer.