-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstudentSys.py
More file actions
30 lines (29 loc) · 771 Bytes
/
Copy pathstudentSys.py
File metadata and controls
30 lines (29 loc) · 771 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
students = []
invalidChoice = 0
while True:
print("""
1. Add student
2. List student
3. Delete student
4. Exit
""")
choice = int(input("Pick a number from the menu: "))
if choice == 1:
name = input("Enter student name: ").lower()
students.append(name)
print("Student Adedded")
elif choice == 2:
for st in students:
print (st)
elif choice == 3:
name = input("Enter student name to delete: ").lower()
students.remove(name)
print("Student deleted")
elif choice == 4:
break
else:
print("Invalid choice")
invalidChoice +=1
if invalidChoice == 3:
print("Ciyaarta meesha kala tag")
break