Write pseudocode for a Python program that uses iteration to guess a number from 1 to 10 that matches the computer’s number. Enter a name, the computer selects a number, users guess a number, and they keep guessing until they correctly guess the computer’s number. Turn in the pseudocode, Python program, and a screenshot of your output. Step 1: Ask the player to enter a name or quit to exit Step 2: use a while statement to test when the name is not equal to quit Step 3: input enter a number from 1 to 10 for the variable your_guess # display the number guessed print("Your number is", your_guess) while num != your_guess: Step 4: Write an if statement for your_guess is less than num Step 5 display text with your guess and You won, name Step 6 ask the player to enter a name or quit to exit

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 30PE
icon
Related questions
Question

Write pseudocode for a Python program that uses iteration to guess a number from 1 to 10 that matches the computer’s number. Enter a name, the computer selects a number, users guess a number, and they keep guessing until they correctly guess the computer’s number. Turn in the pseudocode, Python program, and a screenshot of your output.

Step 1: Ask the player to enter a name or quit to exit

Step 2: use a while statement to test when the name is not equal to quit

Step 3: input enter a number from 1 to 10 for the variable your_guess


# display the number guessed
print("Your number is", your_guess)

while num != your_guess:

Step 4: Write an if statement for your_guess is less than num

Step 5 display text with your guess and You won, name

Step 6 ask the player to enter a name or quit to exit

 

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr