forked from AmI-2018/python-lab1
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEx3.py
More file actions
30 lines (28 loc) · 661 Bytes
/
Ex3.py
File metadata and controls
30 lines (28 loc) · 661 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
i = 0
task = []
exit_status = 0
while exit_status == 0:
print("To-do Manager:")
print("1. Insert new task")
print("2. Remove task")
print("3. Show all tasks")
print("4. Exit")
choice = int(input())
if choice == 1 :
print("Insert name: ")
name = input()
task.append(name)
i += 1
print(i)
elif choice == 2 :
print("Insert name: ")
name = input()
task.remove(name)
i -= 1
elif choice == 3 :
for x in range(1,i+1):
print(str(x) + ". " + task[x-1])
elif choice == 4:
exit_status = 1
else:
print("Wrong number!")