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):
|
||||
interrogatives = ("how", "what", "why")
|
||||
capitalized = phrase.capitalize()
|
||||
if phrase.startswith(interrogatives):
|
||||
return "{}?".format(capitalized)
|
||||
else:
|
||||
return "{}.".format(capitalized)
|
||||
temps = [221, 234, 340, 230]
|
||||
|
||||
results = []
|
||||
while True:
|
||||
user_input = input("Say something: ")
|
||||
if user_input == "\end":
|
||||
break
|
||||
else:
|
||||
results.append(sentence_maker(user_input))
|
||||
|
||||
print(" ".join(results))
|
||||
print([temp / 10 for temp in temps])
|
||||
|
Loading…
Reference in New Issue
Block a user