0% found this document useful (0 votes)
4 views1 page

Python_A11

This document outlines the creation of a guessing game where players must guess a randomly selected number. It details the steps to form an algorithm for the game, including player input and feedback on guesses. The game continues until the player decides not to play again, utilizing a while loop to manage the gameplay flow.

Uploaded by

biji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Python_A11

This document outlines the creation of a guessing game where players must guess a randomly selected number. It details the steps to form an algorithm for the game, including player input and feedback on guesses. The game continues until the player decides not to play again, utilizing a while loop to manage the gameplay flow.

Uploaded by

biji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Session 3

Be Methodical – Form a Plan


In this programming mission you create a guessing game. The player
must pick the correct number. To start, you will build the first part of the
program. The code will:
• pick a random number
• ask the player to guess the number
• tell the player if they guessed correctly
• allow the player to play again

Sequence the Steps in the Program

1. A programmer needs to follow a plan. Complete the algorithm for the Guess It game.

START

Place the steps


into the
 algorithm:

 YES

 Player picks a
 number.

 Game selects
a number
You are wrong. between 1
and 10.

You are right!  NO

 Game checks
if the player
GAME guessed
OVER correctly.
 Play
again?

The game uses a while loop. It


ends when the player says NO
they do not want to play again.

END

2. A programmer will think about the code for each step. What code is for step 2?
 pick=input('What is your guess?')  if pick!=guess:

Copyright © TechnoKids Inc. 52 TechnoPython | Python

You might also like