Commit 50e3abc5 authored by Bastien Terrier's avatar Bastien Terrier
Browse files

fix check character is letter

parent 038a54ca
......@@ -46,7 +46,7 @@ def displaySentence(sentence):
initFile(f_dataStream, sentence)
for char in sentence:
if (ord(char) > ord('A') and ord(char) < ord('Z')) or char == "?" or char == "!" or char == " " :
if (ord(char) >= ord('A') and ord(char) <= ord('Z')) or char == "?" or char == "!" or char == " " :
displayCharacter(f_dataStream, char)
else:
print("Error, not a character")
print("Error, '{}' not a character".format(char))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment