Question
Old MathJax webview Old MathJax webview Old MathJax webview create a program that allows you to register a person's identification number and the first and
Old MathJax webview
create a program that allows you to register a person's identification number and the first and last name associated with this identification number. In addition to this, 3 grades of a student must be entered. Use dictionaries to save the pairs (ID, name-surname, notes). Create an Options menu (The menu must be created as a Function and receive Parameters, it must have the options as inside a list / dictionary or tuple, in addition to making the menu validation, example of menu (menu ([1,2,3,4 , 5,6] or menu = ([1,2,3,4,5,6])), in addition there must be the menu function in each option of the program) 1.- Data entry 2.-Check the name and surname by ID 3.- Show the average of a student's grades x ID 4 -.Show all the Dictionary data 5.-Update the data by cell phone 6.-Exit
example for option 5 and menu as function with parameters
the photos is the code as an example or help, it also has errors and is incomplete, kindly use python 3
You cannot use python functions for any reason, you can loop using nested loops example of error (alumnos.get(aux_cedula),alumnos.tems() ), you cannot use any python function, otherwise it will be scored with zero, the minimum score 0
Please, Do not use python functions for any reason, you can loop using nested loops, you cannot use any functions, example in the photos, Thanks
everything is in English, the photos are examples or help. There are photos in Spanish, but they are help that I have kindly provided. Solve the question, thanks
the error is when you use python functions like (get, items ... among the other functions that are not allowed in the present program)
I hope I have solved your doubts, please solve the exercise completely
students = {} #usamos el bucle para hacer el menu while True: menu = [] a = 'menu', b = '1: Data entry',c = '2: Check name and surname by ID' d = '3: Show all data', e = '4.Show the Average of a student's grades', f = '5. Update data , g = '6.exit' menu.append (a) menu.append (b) menu.append (c) menu.append (d) menu.append (e) menu.append (f) #list with menu students [a] = menu n=int(input('op(1-6): ')) print() if n==1: Ist=[] ... id = str(input('ID:')) name = str(input('name')) lastname = str(input(' Lastname')) ni =int(input('Noti ')) n2 =int(input('Not2: ')) n3 -int(input('Not3: ')) 1st.append(name) 1st.append(lastname) 1st.append(n1) Ist.append(n2) 1st.append(n3) #agregamos los datos al diccionario students[id] = lst elif n == 2: aux_id=input('Id') valid=True for elemen in students.keys(): if elemen == aux_id: print(aux_id, students[elemen]) valid=False break if valid: print('...') elif n == 3: 34 35 3 36 ON 09 37 38 39 40 41 42 43 44 students[id] = Ist elif n == 2: aux_id=input( 'Id) valid=True for elemen in students.keys(): if elemen == aux_id: print(aux_id, students[elemen]) valid=False break if valid: print('...') elif n == 3: for elemn in students.keys(): print('T',elemen, students[elemn][@],students[elemn][1], students[elemn][2] students[elemn][3], students[elemn][4], sep=",,end='1') 45 46 47 48 49 50 51 52 NO 5 53 ST name = 2 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 elif n==4: key - str(input(' ID :')) if key in students.keys(): promedio = int(students[key][2])+int(students[key][3])+int (students[key][4]) print("Promedio:" , round(float(promedio/3),2)) else: print( 'ID invalido!! ') elif n=-5: 1st1=[] aux_id=int(input('id: ')) str(input(' ')) lastname = str(input(' ')) 1st.append(name) 1st.append(lastname) if aux_id not in students.keys(): students [aux_id]=1st1 else: print('error') #salir del menu elif n 6: print( 'quit) break else: #error de ingreso print('error") print() DWN elif (opc==> ): aux_cedula= input ("Inga if alumnos.has_key (aux_cedula): print alumnos.get (aux_cedula) n=input("...y aper input ("In # Se actualiza en el diccionaris alumnos (aux cedula] = [n, ape) ) print (alumnos.items()) print (" Data caring .. In ") \ else: print("N sace menu () opc = int (input ("I ;")) items() clear() copy(). get() update() setdefault() has_key(), clear(), pop()Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started