Assignment 3
Conditions and Functions
Submit before 11:30 PM Saturday April 20

Overview

You will write three simple programs involving lists, conditions and functions.

Python Scripts (little programs)

Write and test Python programs or functions that do the following:

  1. Random story: write a Python program that prompts the user for two words or phrases (using two input statements). For a third word or phrase, your script should randomly select among a list. It should then produce a short story from the three words or phrases.
  2. Write a function called tuition. It should take one parameter: an integer specifying the number of credit hours a student is taking. It should then print a message reporting the tuition code based on the following scheme:
    • Tuition for 1 - 11 credits is the number of credit hours times 758.
    • Tuition for any credits between 12 and 18 is a flat rate of 14555 dollars.
    • Tuition for any credits over 18 is 12803 plus the credits beyond 18 times 758.
  3. Write a Python program that asks the user the number of credit hours using the input function. It should then call your tuition function to report the tuition cost.

Deliverables

Create a summary file called assn3 (pdf or txt) that contains the following:

  1. A statement that summarizes your completion of the assignment. Discuss your experience. Note any help or collaboration.
  2. For each of your Python code problems:
    1. A listing of the code (copy the code in the py file and past it in the assn1 file)
    2. Running examples that demonstrate that your code works correctly (copy the text that shows your py file running and paste it in the assn3 file)

Submit your assn3 file to D2L.