-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProfessionalprogram.py
More file actions
52 lines (52 loc) · 1.94 KB
/
Copy pathProfessionalprogram.py
File metadata and controls
52 lines (52 loc) · 1.94 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
isCreated = False
while True :
print("---------------------Wellcome to Student System-----------------")
print("1-Insert Record.")
print("2-View Record.")
print("3-Delete Record.")
print("4-Update Record.")
print("5-Exit")
choice = int(input("Enter Choice : "))
if choice == 1 :
name = input("Enter name : ")
id = int(input("Enter ID : "))
Gpa = float(input("Enter Gpa : "))
isCreated = True
if choice == 2 :
if isCreated == True :
Id = input(print("Enter id of student whose data you want to view : "))
if Id == id :
print("Name of student : ",name)
print("id of student : ",id)
print("Gpa of student is : ",Gpa)
elif Id != id :
print("Invalid id")
if isCreated == False :
print("No data enetred.")
if choice == 3 :
if isCreated == True :
Id = input(print("Enter id of student whose data you want to view : "))
if Id == id :
isCreated == False
print("Record Deleted successfully.")
elif isCreated == False :
print("No data enetred.")
if choice == 4 :
if isCreated == True :
Id = input(print("Enter id of student whose data you want to view : "))
if Id == id :
print("Name of student : ",name)
print("id of student : ",id)
print("Gpa of student is : ",Gpa)
print("-----------------------------")
print("Now Enter New Data .")
isCreated == False
name = input("Enter name : ")
id = int(input("Enter ID : "))
Gpa = float(input("Enter Gpa : "))
isCreated = True
if isCreated == False :
print("No data enetred.")
if choice == 5 :
print("exiting------------")
exit(0)