Aug-14-2018, 01:35 AM
I am a complete noob and old to boot, I have created some code that will give the user 2 chances to get the correct answer, if they are wrong 2 times, a HINT will print to the terminal due to a nested while loop, I would like to give them 2 more chances, then give them the ANSWER, I cannot get an additional nested while loop to work, please help an old guy. Maybe another nested while loop is not what is required?? Wrong is a global code declared at the top of the game, along with Correct (not used in this type of multiple answer question 'a' thru 'g'). Wdo 10, python 3.
wrngCnt = 0
q2a = input('Construct the minimal BOILER PLATE HTML Template answer NOW: \n\n')
if q2a == '<!DOCTYPE html>':
time.sleep(1)
while q2a != '<!DOCTYPE html>':
print(wrong)
q2a = input() #Waiting for the user to input the correct answer again
while wrngCnt < 1:
wrngCnt = wrngCnt + 1
print('')
print('@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@')
print('HINT: This line of code requires the HTML5 tag, no indent.)
print('@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@')
print('')
q2b()Hope the tags are working, this is the first question 'a' thru 'g' to allow the user to type into the terminal the minimal boiler plate that I previously taught in a tutorial within the game, if we can make 'a' work, I can get the next 1000 questions to work, thanks in advance for any assistance.
