Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that generates a random number in the range of 1 through 100, and asks the user to guess what the number is.

Write a program that generates a random number in the range of 1 through 100, and asks the user to guess what the number is. If the user’s guess is higher that the random number the program should display “too high try again.” If the user’s guess is lower than the random number, the program should display “too low,try again” If the user guesses the number the application should congratulate the user and then generate a new random number so the game can start over.


Step by Step Solution

3.38 Rating (157 Votes )

There are 3 Steps involved in it

Step: 1

generates and imports a random number between 1100 import random sets main function def m... 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

Document Format ( 2 attachments)

PDF file Icon
60961e104323d_26622.pdf

180 KBs PDF File

Word file Icon
60961e104323d_26622.docx

120 KBs Word File

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Introduction to Java Programming, Comprehensive Version

Authors: Y. Daniel Liang

10th Edition

133761312, 978-0133761313

More Books

Students also viewed these Programming questions

Question

=+61. Refer to Exercise 46 of Section 7.4.

Answered: 1 week ago

Question

=+60. Refer to Exercise 42 of Section 7.4.

Answered: 1 week ago