Hi there,
I am trying to make a program that asks someone to translate a certain word from a foreign language to English.
I ask them using raw_input for a translation and then want to compare each the letters from the word they inputted to the correct way of spelling. For example:
q = raw_input ("How do you spell in English the Danish word x")
first_letter = q [0]
second_letter = q [1]
thrid _letter = q [2]
if first_letter.lower() == "d" and second_letter.lower() == "o" and third_letter.lower() == "g"
print "Right on!"
As you can see I am trying to compare each letter of the answer that was inputted to the correct way of spelling.
Am I doing this right at all? I know you can just import a library of spelling check but I need it this way.
Thanks
q = raw_input ("How do you spell in English the Danish word x")
first_letter = q [0]
second_letter = q [1]
thrid _letter = q [2]
if first_letter.lower() == "d" and second_letter.lower() == "o" and third_letter.lower() == "g"
print "Right on!"