Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bastien Terrier
xeyes_sentences
Commits
50e3abc5
Commit
50e3abc5
authored
May 24, 2018
by
Bastien Terrier
Browse files
fix check character is letter
parent
038a54ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/functions.py
View file @
50e3abc5
...
...
@@ -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
)
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment