subject

In this lab, you will write a function called when the function is called, it will do the following: generate a random integer between 1 and 10 (you will need to import and use the random library) allow user 3 chances to guess the number if the user guessed the correct number, print out "you guessed it! " and ends the game otherwise if user made an incorrect guess, print out "incorrect! " it will compare the guess with the generated random number, and if the guess is smaller, print out a hint message "you guessed too low"; else if the guess is larger, print out a hint message "you guessed too high" reduce the chance by one printout how many chances are left if user has not used up the chances, ask the user to guess the number if user used up the three chances, print "you lost! the number is [number]". game ends sample output: > > > numberguessinggame() guess a number between 1 and 10: 8 you guessed too high you have 2 chances left. guess a number between 1 and 10: 4 you guessed too high you have 1 chances left. guess a number between 1 and 10: 3 you guessed too high you have 0 chances left. you lost! the number is 1 check point thoroughly test your program and make sure your program works. submit your python code as .py file in text format, and capture the screens of your program running showing multiple input and output.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 03:30
In vista and windows 7, the appearance and personalization option allows you to change the
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. what does it indicate when a website displays https instead of http? a. the website is secure. b. there is no secure sockets layer. c. the secure sockets layer is hidden. d. the website is not secure.
Answers: 1
question
Computers and Technology, 24.06.2019 00:50
Which of the following is not a key player in the sale of travel products?
Answers: 2
question
Computers and Technology, 24.06.2019 09:50
Self contained sequences of actions to be performed are? a. expressions b. algorithms c. functions d. formulas
Answers: 1
You know the right answer?
In this lab, you will write a function called when the function is called, it will do the following...
Questions
Questions on the website: 13722360