Lesson 60
This commit is contained in:
parent
64b582fa6f
commit
1d6d6d14af
18
basics.py
18
basics.py
@ -1,18 +1,4 @@
|
|||||||
def sentence_maker(phrase):
|
temps = [221, 234, 340, 230]
|
||||||
interrogatives = ("how", "what", "why")
|
|
||||||
capitalized = phrase.capitalize()
|
|
||||||
if phrase.startswith(interrogatives):
|
|
||||||
return "{}?".format(capitalized)
|
|
||||||
else:
|
|
||||||
return "{}.".format(capitalized)
|
|
||||||
|
|
||||||
results = []
|
print([temp / 10 for temp in temps])
|
||||||
while True:
|
|
||||||
user_input = input("Say something: ")
|
|
||||||
if user_input == "\end":
|
|
||||||
break
|
|
||||||
else:
|
|
||||||
results.append(sentence_maker(user_input))
|
|
||||||
|
|
||||||
print(" ".join(results))
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user