Python Forum
While loop won't restart program :(
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
While loop won't restart program :(
#5
(Apr-04-2019, 07:26 PM)ichabod801 Wrote: You need to indent the line Yoriz pointed out. The line before that, you set z to 2. That ends the loop, because it only repeats if z is one. Since the last line is not in the loop, you don't get a chance (in the loop) to stay in the loop.

Oh I see! Thank you guys! :D
Reply


Messages In This Thread
While loop won't restart program :( - by TheDovah77 - Apr-04-2019, 06:37 PM
RE: While loop won't restart program :( - by Yoriz - Apr-04-2019, 06:59 PM
RE: While loop won't restart program :( - by TheDovah77 - Apr-04-2019, 07:37 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Noob here. Random quiz program. Using a while loop function and alot of conditionals. monkeydesu 6 1,319 Sep-07-2022, 02:01 AM
Last Post: kaega2
  How a Mac OS software can restart itself with admin permission in Python 3.7? Formationgrowthhacking 0 1,740 Sep-03-2020, 05:29 PM
Last Post: Formationgrowthhacking
  Using a button to kill and restart a script duckredbeard 3 3,247 Sep-01-2020, 12:53 AM
Last Post: duckredbeard
  Try-except in while loop: error with closing program Lupin_III 7 2,792 Jul-03-2020, 10:57 AM
Last Post: Lupin_III
  Hotkey to restart code? DannyB 1 2,696 May-20-2020, 02:52 AM
Last Post: michael1789
  Kernel needs to restart ErnestTBass 0 2,325 May-06-2020, 08:37 PM
Last Post: ErnestTBass
  How to restart Python after input change ozstar 3 2,322 Apr-29-2020, 03:16 AM
Last Post: ozstar
  Restart Error when using code from lesson book Kathleen57 2 2,216 Mar-13-2020, 09:18 PM
Last Post: Kathleen57
  please help me in loop i am trying to run this program in raspberry pi by sending msg saifullahbhutta 2 2,299 Jan-27-2020, 02:32 PM
Last Post: saifullahbhutta
  How to rerun the program in a loop with different input? bharaths 3 3,715 Nov-23-2018, 09:36 AM
Last Post: bharaths

Forum Jump:

User Panel Messages

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