Note: Homework assignments should be completed in identified pairs (not more than two students), but may be done individually as well. As a pair, you should submit your assignments separately, but you will receive the same grade as your partner.

In this assignment, you will make a game to help students learn the factors of two, three, and five. The player enters the minimum number (min), the maximum number (max) and a direction (up or down) depending on whether they want you to count up or down.

Here is an example output of the game:

Min:3
Max:12
Direction (up/down):down
0 3 6 9 12 
10 five golden rings!
0 3 6 9 
4 6 8 
0 3 6 
5 five golden rings!
4 
0 3 
Would you like to play again (Y or y for Yes)?y
Ok, here we go....
Min:3
Max:12
Direction (up/down):up
0 3 
4 
5 five golden rings!
0 3 6 
4 6 8 
0 3 6 9 
10 five golden rings!
0 3 6 9 12 
Would you like to play again (Y or y for Yes)?y
Ok, here we go....
Min:1
Max:2
Direction (up/down):up
2 
Would you like to play again (Y or y for Yes)?y
Sorry, I'm too tired to play again...

Note: You are prohibited from creating lists in your solution to this homework assignment.

Grading criteria (10 points):

Style points (2 points)

The submission:

  • includes a header including both partners’ names, the filename, and any references
  • uses appropriate, informative variable names
  • is called hmwk5.py and runs without syntax errors
  • is accompanied by a completed self-evaluation by the author

Operations (8 points)

The program:

  • correctly reads appropriate user inputs
  • prints numbers in correct order
  • handles both up and down
  • handles multiples of 5
  • handles multiples of 3
  • handles multiples of 2
  • produces a random output
  • plays game until done


Submissions

Your submission must include the course header at the top.

Last Submission March 3, 2020 at 10:00PM (EST). Go to our Moodle page. Submit your hmwk5.py file and fill out your self-assessment.