subject

Define a function called guessnumber that implements the following game, in which the computer will: • think of a random number in the range 0-50. (hint: use the random module.) • repeatedly prompt the user to guess the mystery number. • if the guess is correct, congratulate the user for winning. if the guess is incorrect, let the user know if the guess is too high or too low. • after 5 incorrect guesses, tell the user the right answer.

the following is an example of correct input and output.

i'm thinking of a number in the range 0-50. you have five tries to guess it.

guess 1? 32

32 is too high

guess 2? 18

18 is too low

guess 3? 24

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 03:30
Identify at least three types of characteristics that you were asked about as you the computer identify a fruit.
Answers: 3
question
Computers and Technology, 23.06.2019 01:00
Write the command that can be used to answer the following questions. (hint: try each out on the system to check your results.) a. find all files on the system that have the word test" as part of their filename. b. search the path variable for the pathname to the awk command. c. find all files in the /usr directory and subdirectories that are larger than 50 kilobytes in size. d. find all files in the /usr directory and subdirectories that are less than 70 kilobytes in size. e. find all files in the / directory and subdirectories that are symbolic links. f. find all files in the /var directory and subdirectories that were accessed less than 60 minutes ago. g. find all files in the /var directory and subdirectories that were accessed less than six days ago. h. find all files in the /home directory and subdirectories that are empty. i. find all files in the /etc directory and subdirectories that are owned by the group bin."
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
Which statistical function in a spreadsheet you to see how far each number varies, on average, from the average value of the list?
Answers: 2
question
Computers and Technology, 23.06.2019 16:30
You have read about the beginnings of the internet and how it was created. what was the internet originally created to do? (select all that apply) share research. play games. communicate. share documents. sell toys
Answers: 1
You know the right answer?
Define a function called guessnumber that implements the following game, in which the computer will:...
Questions
question
Medicine, 20.10.2020 18:01
question
History, 20.10.2020 18:01
question
Mathematics, 20.10.2020 18:01
question
Mathematics, 20.10.2020 18:01
question
Chemistry, 20.10.2020 18:01
Questions on the website: 13722363