Hi all
I’m very new to python, so this may be a basic question but that’s the idea right.
How do I start again or break the loop to continue?
I’m building a text game (i think the tut video was linked from here) to help learn.
I’m expanding on the basic format of the lesson.
It asks the users name
then asks the users age.
if 18+ it continues.
If 14 - 17 it asks for the parents, then asks if they are present, it says they should input 18yrs when they are asked the age question again. **this is where I’d like it to restart the game to ask the age again and when 18 is inputted it would continue like the original question
If under 14, it tells the kid to lie and to type 18 in the age **this is where I’d like it to restart the game to ask the age again and when 18 is inputted it would continue like the original question
The user inputting etc all work fine but the game either stops after the parents are present or if I use while, it loops asking if the parents are present
eg line 20 returns y then line 6 would start again giving chance to input 18 and continue the game
I’ve tried while, break, continue, exit and few others I can’t remember?
I’ve tired swapping the order of if statements,