Question: Write a program called inputeval.py that: In a comment on the first line gives your full name (first and last). Assigns the value of your

  1. Write a program called inputeval.py that:
    1. In a comment on the first line gives your full name (first and last).
    2. Assigns the value of your favorite integer to the variable numfave.
    3. Creates a counting variable called ucount that counts the number of guesses made by the user.
    4. Asks the user to guess integers until the user guesses the value of numfave by stating Guess my integer. Assign the users input to the variable uguess.
    5. Each time the user guesses a value, convert the inputted value into an integer (assume the user will only input integers).
      1. Compare the users guess to the value of numfave.
      2. If the guess is incorrect, tells the user whether the guessed integer is too high or too low and then asks the user to input another guess.
      3. If the guess is correct, congratulates the user and tells the user how many attempts it took for them to guess correctly.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!