Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help with Loop.
#2
You need a loop. Are you familiar with any programming languages? If so, please forgive. A loop allows you to run the same code over and over without having to write the code over and over. You would have a loop that repeatedly called guess_number() over and over until some condition is met. For example
done = 'N'
While done != 'Y':
   guess_number()
   done = input('Would you like to play again (Y/N)? ')
Python has other kinds of loops that are useful for doing different kinds of processing.
Reply


Messages In This Thread
Need help with Loop. - by gnosticwhispers - Apr-01-2020, 07:42 PM
RE: Need help with Loop. - by deanhystad - Apr-01-2020, 08:39 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020