-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathday33_100a.py
37 lines (35 loc) · 953 Bytes
/
day33_100a.py
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
34
35
36
37
import os
myAgenda = []
def printList():
for item in myAgenda:
print(item)
print()
while True:
menu = input("Add or Remove?: ")
print()
print("====================")
if menu == "Add":
item = input("What's next on the Agenda?: ")
myAgenda.append(item)
// common error myAgenda first, then append, then item inside parenthesis
// attribute error
os.system('clear')
elif menu == "Remove":
print()
item = input("What do you want to remove?: ")
if item in myAgenda:
myAgenda.remove(item)
else:
print()
print(f"{item} not found")
print()
else:
print("Invalid option")
print("Please try again")
print("====================")
os.system('clear')
continue
print(" AGENDA")
print("----------------------------")
printList()
print("----------------------------")