May-11-2019, 12:03 PM
I'm trying to create a program that checks your spelling. It will ask the user what word they want to spell and then they will type it out, this isn't a project I'm serious about as I'm just trying to learn how something like this would work, but my dad suggested that I add a feature where it would check the letters in the input and tell you how many you got right.
How would I go around doing something like this?
How would I go around doing something like this?
Word = 0
Answer = 0
Correct = 0
Incorrect = 0
Loop = True
IfLoop = 0
while Loop:
print("Choose a word.")
Word = input("")
print(f"Spell {Word}")
Answer = input("")
if Answer == Word:
print("Correct! Well done!")
Correct = Correct + 1
print(f"Correct:{Correct}\nIncorrect:{Incorrect}")
elif Answer != Word:
print("Incorrect...")
Incorrect = Incorrect + 1
print(f"Correct:{Correct}\nIncorrect:{Incorrect}")
IfLoop = int(input("Do you want to go again?\n1)Yes\n2)No\n"))
if IfLoop == 1:
Loop = True
elif IfLoop == 2:
Loop = False
