Nov-17-2018, 06:36 PM
(Nov-17-2018, 06:10 PM)searching1 Wrote: Any idea how can I retain the same question if it's wrong?
To continue asking if the answer is wrong, use a while loop, and exit if the answer is correct. Something like:
while True: student = input(qs[i]+ "\n Ilagay ang iyong sagot: ").upper() if student == an[i].upper(): print("Correct\n") score += 1 break else: print("\n Wrong! Try Again\n") print("Attempt",count) count += 1
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures