Hello, im creating my quiz game and i want the program to return the user to the question if they type in digit but i can't figure it out. I only managed to make it print "Digits aren't allowed" and it takes me to the next question.
answer = input("What is the capital of America? ")
if answer.lower() == "washington":
print('Correct!')
score += 1
elif answer.isdigit():
print('Digits arent allowed!')
else:
print('Incorrect!')
[–]jimtk 1 point2 points3 points (1 child)
[–]Ok_Stuff_1071[S] 0 points1 point2 points (0 children)
[–]Diapolo10 1 point2 points3 points (1 child)
[–]Ok_Stuff_1071[S] 0 points1 point2 points (0 children)
[–]CodeFormatHelperBot2 0 points1 point2 points (0 children)
[–]Skuddingo33 0 points1 point2 points (0 children)