Lesson 60

This commit is contained in:
David Avery 2020-01-29 14:01:26 +00:00
parent 64b582fa6f
commit 1d6d6d14af

View File

@ -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))