+ 1

Can anybody please tell me why i am getting an error. Please correct my code. Thank you in advance

https://code.sololearn.com/cNVB5pQNuHKG/?ref=app

22nd Apr 2018, 1:21 PM
kevin thomas
kevin thomas - avatar
9 odpowiedzi
+ 2
don't use a break here
22nd Apr 2018, 1:36 PM
PRITAM CHAKRABORTY
PRITAM CHAKRABORTY - avatar
+ 11
y=input("Enter something") #break cannot be used outside loop
22nd Apr 2018, 1:24 PM
Muhd Khairul Amirin
Muhd Khairul Amirin - avatar
+ 6
kevin thomas just make the == to !=
22nd Apr 2018, 1:31 PM
Vivek Sivaramakrishnan
Vivek Sivaramakrishnan - avatar
+ 4
y = int(input("to get started press 1\notherwise press 0 to exit")) if y == 0: print('exiting ') # break else : print("You can Continue now")
22nd Apr 2018, 1:35 PM
PRITAM CHAKRABORTY
PRITAM CHAKRABORTY - avatar
+ 2
you can use exit() to stop your program
22nd Apr 2018, 1:39 PM
PRITAM CHAKRABORTY
PRITAM CHAKRABORTY - avatar
+ 1
can u show me the correct code please
22nd Apr 2018, 1:25 PM
kevin thomas
kevin thomas - avatar
+ 1
then what can I use to stop the program
22nd Apr 2018, 1:37 PM
kevin thomas
kevin thomas - avatar
+ 1
thank you
22nd Apr 2018, 1:43 PM
kevin thomas
kevin thomas - avatar
0
you are welcome
22nd Apr 2018, 1:43 PM
PRITAM CHAKRABORTY
PRITAM CHAKRABORTY - avatar