0

Can anyone help to make this code work?

I developing a quiz for children and I want the the code to say ("Incorrent, Answer is 12") only in the last attempt. After 3 attempts print("Incorrent, Answer is 12") Is there anyway to do this? print('Enter correct Answer') count=0 while count < 3: ques1 = int(input("What is 3 x 4: ")) if ques1==12: print("Correct") if count>=3: print("Incorrent, Answer is 12") break else: print("Incorrent") count += 1 https://code.sololearn.com/cA8zS5Qgz5cu/?ref=app

17th Apr 2021, 6:14 PM
Steve Nova
Steve Nova - avatar
3 odpowiedzi
+ 2
# something like this? # Created by Steve Nawa 🇳🇦 print('Enter correct Answer') count=0 no_of_try = 3 while count < no_of_try: ques111 = int(input("What is 3 x 4: ")) if ques111==12: print("Correct") if count>=no_if_try: print("Incorrent, Answer is 12") break elif count==no_of_try-1: print("\nIncorrent, Answer is 12") break else: print("Incorrent") count += 1
17th Apr 2021, 6:24 PM
RKK
RKK - avatar
+ 1
Niiice work thanks so much. 🤞✌️
17th Apr 2021, 6:28 PM
Steve Nova
Steve Nova - avatar
+ 1
you're welcome, happy learning :)
17th Apr 2021, 6:31 PM
RKK
RKK - avatar