Commit 0e8c51ce authored by Bastien Terrier's avatar Bastien Terrier
Browse files

Fix condition to displayCharacter

parent fc0e609f
......@@ -40,7 +40,7 @@ def displaySentence(sentence):
initFile(f_dataStream, sentence)
for char in sentence:
if ord(char) < ord('A') or ord(char) > ord('Z') or char != "?" or char != "!" or char != " " :
print("Error, not a character")
else:
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")
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