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
- 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 favorite integer to the variable numfave.
- Creates a counting variable called ucount that counts the number of guesses made by the user.
- 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.
- Each time the user guesses a value, convert the inputted value into an integer (assume the user will only input integers).
- Compare the users guess to the value of numfave.
- 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.
- 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
