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
8 Answers
+ 3
As noname said, continue is for loops
+ 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
+ 2
Something like that but in computer is better
https://code.sololearn.com/cZJGAp97TqTV/?ref=app
+ 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
+ 1
if you share your full code maybe we could help you
+ 1
Daniel that is the full code, correct it and run and it give me feedback
0
I am trying to make it go back to the beginning and rerun the code
0
To rerun the code you should put the if/elif statement into a loop