View the step-by-step solution to:

Question

please use python and explain.


Develop a guessing software. The program generate a number

between 1 and 10, and then ask the user to guess that number. If the user does not get it, the program indicates if it is too high or low and asker the user for another guess. Once the user gets the correct response, a successful message comes up with the number of tries used.

- Develop your algorithm. Convert it in Python.

- The program must generate a random number and call the algorithm/function guess(). It will display the successful message and the number of tries as the result.

Top Answer

View the full answer
Untitled17.png

1
import random
2
n = random - randint(1, 10)
3
count=0;
4
guess = int(input("Enter an integer from 1 to 10: "))
5. while n != "guess":
6
print
7 +
if guess < n:
print...

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question