Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

COMP 1516 Python project Function play_chicago (), the function implements the Chicago game. The game is played for 11 rounds. Round numbers start from 2

image text in transcribedCOMP 1516 Python project

Function play_chicago (), the function implements the Chicago game. The game is played for 11 rounds. Round numbers start from 2 to 12. In each round two random numbers between 1 and 6 inclusive will be generated, the random numbers and the round number will be displayed to the user. If the sum of the two numbers equals the round number, the user wins a point and a message to that effect will be displayed. If the user does not win a point a message stating that will also be displayed. At the end of each round the user will be asked if he/she wants to play another round. If the user response was no or the round COMP 1516 SESSION #3 LAB number is 12 the game will end and the total number of earned points will be displayed. Sample output of play_chicago ---- ----- running playing chicago round number 2 first dice number is 4 second dice number is 5 no points, your current points are o do you want to play again?, enter "yes" to continue yes round number 3 first dice number is 4 second dice number is 6 no points, your current points are 8 do you want to play again?, enter "yes" to continue yes round number 4 first dice number is 3 second dice number is 2 no points, your current points are do you want to play again?, enter "yes" to continue yes round number 5 first dice number is 6 second dice number is 2 no points, your current points are o do you want to play again?, enter "yes" to continue yes round number 6 first dice number is 3 second dice number is 1 no points, your current points are 8 do you want to play again?, enter "yes" to continue yes round number 7 first dice number is 5 second dice number is 1 no points, your current points are do you want to play again?, enter "yes" to continue the game is over you earned @ points COMP 1516 SESSION #3 LAB 3 running playing chicago round number 2 first dice number is 1 second dice number is 1 your won a point, your current points are 1 do you want to play again?, enter "yes" to continue yes round number 3 first dice number is 6 second dice number is 3 no points, your current points are 1 do you want to play again?, enter "yes" to continue yes round number 4 first dice number is 1 second dice number is 3 your won a point, your current points are 2 do you want to play again?, enter "yes" to continue yes round number 5 first dice number is 5 second dice number is 2 no points, your current points are 2 do you want to play again?, enter "yes" to continue yes round number 6 first dice number is 2 second dice number is 5 no points, your current points are 2 do you want to play again?, enter "yes" to continue yes round number 7 first dice number is 2 second dice number is 1 no points, your current points are 2 do you want to play again?. enter "yes" to continue ues

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions