Question: Python: This program must be implemented to satisfy all six items listed below for full credits. Any syntax errors that fail its execution will lose
Python: 
This program must be implemented to satisfy all six items listed below for full credits. Any syntax errors that fail its execution will lose all 20 points of this program. 1. It must import the built-in random module in order to create random numbers from 1 to 6. 2. Its main() function performs the following tasks in the given order: A. It calls a function named display_title() (defined below) to print the title of the program, Dice Roller. B. It then prompts user "Roll the dice? (y):" and let user play as many times as he/she likes if 'y' or 'Y' is entered. C. When user wants to play, it calls another function named roll_dice() (defined below) to display result of rolling two dice. D. It checks with user by prompting "Roll again? (y):" to repeat step C above for 'y' or 'Y', or quit the program for any other inputs. 3. It defines display_title() as a function with one parameter, which simply prints the title passed by the argument followed by a space line and returns nothing. 4. It defines roll_dice() as its 2nd function, which calls just another function named roll() twice, defined next, and prints the face value of each die plus their sum, each on its own line as seen in the sample screen above. This function should display a special message "Snake eyes!" for two ones and "Boxcars!" for two sixes. Then, it prints a space line at the end. 5. The roll() function uses no arguments but it returns a random integer between 1 and 6 whenever it is called. 6. It's important that the program must not be executed if it is imported into another module. That is, it runs only if it is executed directly
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
