Abstract
In this chapter, we’ll build a Guess the Number program. The computer will pick a random number between 1 and 20, and the user will have five attempts to guess the number. For every incorrect guess, the computer will let the user know if the correct answer is higher or lower than the user’s guess. If the user doesn’t guess the answer in five attempts, the program will tell the user what the number was.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2018 Irv Kalb
About this chapter
Cite this chapter
Kalb, I. (2018). Loops. In: Learn to Program with Python 3. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-3879-0_6
Download citation
DOI: https://doi.org/10.1007/978-1-4842-3879-0_6
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-3878-3
Online ISBN: 978-1-4842-3879-0
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)