fh1
Active Coder
Hello! Im having a problem with my quiz code. Its showing an error on line 42 saying there is a inconsistent use of tabs and spaces. I tried just using space but it still did not work, i even tried rewriting the line again but it still says it.
i know its lots of code
Python:
points = 3
inventory = []
pointMultiplier = 2
shop = "Shop: point multiplier is 2 points. type it to get it"
print("Press E to stop playing at any time. And press S to visit the shop.")
while True:
print("A. 50")
print("B. 23")
print("C. 63")
question1 = input("How many states are there?")
if question1 == "a" or question1 == "A":
print("Correct!")
points += 1
break
elif question1 == "e" or question1 == "E":
print(f"Your points: {points}")
quit()
elif question1 not in ["a", "A", "B", "b", "C", "c", "E", "e", "s", "S"]:
print("Wrong input!")
continue
elif question1 == "s" or question1 == "S":
shop1 = input(shop)
if shop1 == "Point Multiplier":
if points > pointMultiplier or points == pointMultiplier:
print("Bought")
inventory.append(shop1)
points -= 2
print(f"you know have {points} point(s)")
else:
print("dont have enough :(")
continue
else:
print("Wrong! Try again.")
continue
while True:
print("A. 632")
print("B. 43")
print("C. 365")
question2 = input("How many days does it take for the Earth or orbit the Sun?")
if question2 == "C" or question2 == "c":
print("Correct!")
have = input("Do you have a Point Multiplier?")
if have == "Yes":
if shop1 not in inventory:
print("you dont have it!")
else:
wannaUse = input("You have it! do you want to use it?")
if wannaUse == "Yes":
points += 2
points += 1
break
elif question2 == "e" or question1 == "E":
print(f"Your points: {points}")
quit()
elif question2 not in ["a", "A", "B", "b", "C", "c", "E", "e"]:
print("Wrong input!")
continue
else:
print("Wrong! Try again.")
continue
while True:
print("A. Pablo Piccasso")
print("B. Leanorda Da Vinci")
print("C. Walt Disney")
question3 = input("Who painted the Mona Lisa?")
if question3 == "b" or question3 == "B":
print("Correct!")
points += 1
break
elif question3 == "e" or question1 == "E":
print(f"Your points: {points}")
quit()
elif question3 not in ["a", "A", "B", "b", "C", "c", "E", "e"]:
print("Wrong input!")
continue
else:
print("Wrong! Try again")
continue
while True:
print("A. Omnivours")
print("B. Carnivours")
print("C. Dinosaur")
question4 = input("What are animals that eat both meat and plants called?")
if question4 == "A" or question4 == "a":
print("Correct!")
points += 1
break
elif question4 == "E" or question4 == "e":
print(f"Points: {points}")
quit()
elif question4 not in ["A", "a", "B", "b", "c", "C", "e", "E"]:
print("Wrong input!")
continue
else:
print("Wrong! Try again.")
continue
while True:
print("A. Pneumonia")
print("B. Acrophobia")
print("C. Neophobia")
question5 = input("What is the fear of heights called?")
if question5 == "B" or question5 == "b":
print("Correct!")
points += 1
break
elif question5 == "e" or question5 == "E":
print(f"Points: {points}")
quit()
elif question5 not in ["A", "a", "B", "b", "c", "C", "e", "E"]:
print("Wrong input!")
continue
else:
print("Wrong! Try again.")
continue
while True:
print("A. Aerophobia")
print("B. Astraphobia")
print("C. Neophobia")
question6 = input("What is the fear of flying called?")
if question6 == "A" or question6 == "a":
print("Correct!")
points += 1
break
elif question6 == "e" or question6 == "E":
print(f"Points: {points}")
quit()
elif question6 not in ["A", "a", "B", "b", "c", "C", "e", "E"]:
print("Wrong input!")
continue
else:
print("Wrong! Try again.")
continue