+ 2

Plz help me with my buggy code ! While loops and operators. Python. Im coding in pycharm on pc this is the buggy part.

Buggy code https://code.sololearn.com/cye93SuU8y3Q/?ref=app

1st Jun 2017, 7:16 PM
Albert Blaauw
Albert Blaauw - avatar
4 Respostas
+ 6
Try this: while True: x = input("Insert your answer here: ") if x == "2": print("Correct!") break print("Your answer is incorrect")
1st Jun 2017, 7:47 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 3
def i(): x = input("insert your answer here: ") print(x) while (x != '2'): x = input("plz try again: ") print(x) if ( x == '2'): print("Your correct") i()
1st Jun 2017, 8:00 PM
Emore Anzolin
Emore Anzolin - avatar
+ 1
Tnx guys I will try this
2nd Jun 2017, 5:15 AM
Albert Blaauw
Albert Blaauw - avatar
+ 1
Thnx @ kuba your a genius mate !
2nd Jun 2017, 9:01 AM
Albert Blaauw
Albert Blaauw - avatar