Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
while loop
#5
Don't be afraid of using descriptive names for your variables and as well as some interface message.

As an example:
user_number = int(input("Enter a integer value (0 to finish)> "))
You'll need a way of checking the input, so that you can exit the loop when a zero is entered and a way of storing the inputs.

What data types have you learned about?
Sig:
>>> import this

The UNIX philosophy: "Do one thing, and do it well."

"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse

"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein
Reply


Messages In This Thread
while loop - by idddj - Oct-01-2022, 08:22 AM
RE: while loop - by Yoriz - Oct-01-2022, 08:39 AM
RE: while loop - by idddj - Oct-01-2022, 08:43 AM
RE: while loop - by Yoriz - Oct-01-2022, 08:47 AM
RE: while loop - by rob101 - Oct-01-2022, 09:19 AM
RE: while loop - by idddj - Oct-01-2022, 01:45 PM
RE: while loop - by rob101 - Oct-01-2022, 02:02 PM
RE: while loop - by idddj - Oct-01-2022, 02:04 PM
RE: while loop - by jefsummers - Oct-03-2022, 05:03 PM

Forum Jump:

User Panel Messages

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