-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPy_Exercise-9.py
More file actions
33 lines (25 loc) · 786 Bytes
/
Py_Exercise-9.py
File metadata and controls
33 lines (25 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# -------------------------------------------------------------------------
# Author: Quang Tran
# Date: May 10th, 2019
# -------------------------------------------------------------------------
"""
Question
Write a program that accepts sequence of lines as input and prints the lines after making all characters in the sentence
capitalized.
Suppose the following input is supplied to the program:
Hello world
Practice makes perfect
Then, the output should be:
HELLO WORLD
PRACTICE MAKES PERFECT
"""
lines_entered = []
print("Please enter some sentences. Hit enter one more time when finish: ")
while True:
user_input = input()
if user_input != "":
lines_entered.append(user_input.upper())
else:
break
for line in lines_entered:
print(line)