forked from psounis/python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexercise1.py
More file actions
19 lines (15 loc) · 451 Bytes
/
exercise1.py
File metadata and controls
19 lines (15 loc) · 451 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
my_list = []
for i in range(10):
user_input = int(input("Give a number: "))
while user_input < 10 or user_input > 20:
user_input = int(input("Give a number(10...20): "))
my_list.append(user_input)
print(my_list)
my_tuple = tuple(my_list)
print(my_tuple)
list_squares = []
for i in range(10):
list_squares.append(my_list[i]**2)
list_squares.sort()
tuple_squares = tuple(list_squares)
print(tuple_squares)