What did I do wrong? May you please correct it for me...I was also looking on how to delay when it prints. Like when it prints a sentence I want it to wait about 2 seconds.

Here's the code:

print("\nWelcome to the impossible quiz!\n")

name = input("What's your name before we get started? ")

print("Nice to meet you, "+ name)

print("\nThe rules are very simple, get the answer right and you get 10 points. You only have one chance to get the answer right, get it wrong and you'll lose 3 points! ")

input("\nReady?\n")

user_score = 0

print("First question: Do slugs have four noses?")
if answer = input('Give "F" for False or "T" for True: ')

if answer == "T":
print("Correct, you've gained 10 points!")
user_score += 10

elif answer == "F":
print("Incorrect, you've lost 3 points!")
user_score += -3

What did I do wrong May you please correct it for meI was also looking on how to delay when it prints Like when it prints a sentence I want it to wait about 2 s class=

Respuesta :

Answer:

print("\nWelcome to the impossible quiz!\n")

name = input("What's your name before we get started? ")

print("Nice to meet you, "+ name)

print("\nThe rules are very simple, get the answer right and you get 10 points. You only have one chance to get the answer right, get it wrong and you'll lose 3 points! ")

input("\nReady?\n")

user_score = 0

print("First question: Do slugs have four noses?")

answer = input('Give "F" for False or "T" for True: ')

if answer == "T":

time.sleep(2)

print("Correct, you've gained 10 points!")

user_score += 10

elif answer == "F":

time.sleep(2)

print("Incorrect, you've lost 3 points!")

user_score += -3

Explanation:

Please check the answer. However, if before answer was wrong, and we need to use time.sleep(2) for delaying printing.