-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmenu.py
More file actions
38 lines (36 loc) · 927 Bytes
/
Copy pathmenu.py
File metadata and controls
38 lines (36 loc) · 927 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
34
35
36
37
38
while True:
print(
"""
1. Add a student
2. Delete a student
3. Exit
"""
)
ans = int(input("Choose a number from the menu: "))
if ans == 1:
print(
"""
1. Male
2. Female
"""
)
gender = int(input("Gender: "))
student_name = input("Enter a name: ")
age = int(input("Age: "))
if age < 18:
print("You are underage. Bye bye.")
break
if gender == 1:
print("Mr. " + student_name + " added.")
elif gender == 2:
print("Mrs. " + student_name + " added.")
else:
print("No gender as such.")
elif ans == 2:
student_name = input("Enter a name to delete: ")
print(student_name + " deleted.")
elif ans == 3:
print("Goodbye")
break
else:
print("invalid number")