0

it's not running well and it says "continue" is not properly in the loop, what's wrong?

x=input("Please input your pin") if x==5850: print ("your current balance is $1000") print ("what do you want to do? ") print ("For Withdrawal press '1'") print ("For Transfer press '2'") print ("For Balance press '3'") else: print ("wrong pin") continue

15th Sep 2017, 12:09 AM
Joelsays
Joelsays - avatar
8 Respuestas
+ 3
As noname said, continue is for loops
15th Sep 2017, 1:20 AM
Daniel
Daniel - avatar
+ 3
when you use continue you are saying, ok, stop here and try again with loop but as you are coding only in that piece of code, I think you dont need continue, only a loop statement
15th Sep 2017, 1:22 AM
Daniel
Daniel - avatar
+ 2
Something like that but in computer is better https://code.sololearn.com/cZJGAp97TqTV/?ref=app
15th Sep 2017, 1:37 AM
Daniel
Daniel - avatar
+ 1
the continue keyword is reserved for loops, meaning that, you can only use them inside loops. What it does is skips the current iteration and goes straight into the next iteration. Example if you have a for loop from 0 to 10 and inside that loop you have conditional, if the number is five, continue. So when the number is 5, it jumps straight into 6, and does not execute the code bellow it
15th Sep 2017, 1:04 AM
voidneo
+ 1
if you share your full code maybe we could help you
15th Sep 2017, 1:21 AM
Daniel
Daniel - avatar
+ 1
Daniel that is the full code, correct it and run and it give me feedback
15th Sep 2017, 1:30 AM
Joelsays
Joelsays - avatar
0
I am trying to make it go back to the beginning and rerun the code
15th Sep 2017, 1:06 AM
Joelsays
Joelsays - avatar
0
To rerun the code you should put the if/elif statement into a loop
15th Sep 2017, 2:35 AM
chessmonster
chessmonster - avatar