Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
While loop keeps looping
#4
note that randint(0, 100) will include 0 and 100, while your initial code is [1, 99], i.e. range will start from 1 and will not include 100
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
While loop keeps looping - by mcoliver88 - Jul-29-2020, 12:33 PM
RE: While loop keeps looping - by buran - Jul-29-2020, 12:47 PM
RE: While loop keeps looping - by mcoliver88 - Jul-29-2020, 12:47 PM
RE: While loop keeps looping - by buran - Jul-29-2020, 12:48 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  "while" loop is looping back too early mangurian 1 1,306 Jan-28-2022, 09:15 AM
Last Post: ibreeden
  Nested for loop not looping puttingwordstogether 0 1,737 Jun-16-2020, 11:15 PM
Last Post: puttingwordstogether
  while loop will not stop looping TheTechRobo 5 3,796 Apr-20-2020, 01:47 PM
Last Post: TheTechRobo
  'Looping' does not work out within a 'for Loop' Placebo 4 3,386 Sep-15-2018, 08:19 PM
Last Post: Placebo
  For looping over a list, editing the list from inside the loop? Krookroo 3 3,983 Sep-04-2017, 05:08 PM
Last Post: Krookroo

Forum Jump:

User Panel Messages

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