HOW TO KNOW IF MY INPUT/ STUDENT ID IS VERIFIED AND NOT VERIFIED, IF NOT, ASK THE USER AGAIN TO INPUT A STUDENT NUMBER student_213 = {} # dictionary of student information print ("\t\t\t\t-----------------------------------") print ("\t\t\t\t|   Welcome to Tagumpay Canteen!  |") print ("\t\t\t\t| Walk in Hungry, Walk out happy! |") print ("\t\t\t\t-----------------------------------\n") print ("\nPlease enter the following details: ") # STORE MENU PRICE IN A DICTIONARY CALLED MENUPRICE_213 menuprice_213 = {'Soda':29.25, 'Bottled Water': 20, 'Coffee': 50, 'Tea': 35.50, 'Bread':15, 'Apple':20.50, 'Banana':15, 'Oranges': 25.1, 'Tapsilog':80.99, 'Porksilog':80.99} # STORE MENU QUANTITY IN A DICTIONARY CALLED MENUQNTY_213 menuqnty_213 = {'Soda':4, 'Bottled Water': 4, 'Coffee': 2, 'Tea': 2, 'Bread':1, 'Apple':5, 'Banana':5, 'Oranges': 3, 'Tapsilog':5, 'Porksilog':4} #store the user input in the dictionary named student_213 addstudent_213 = 'Y' studentList_213 = [] # list of student information studenttmp_213 = {} # temporary dictionary of student information totalprice_213 = [] # list of total price of each student #dictionary of student information is created, and the user is asked to enter the following details: while addstudent_213.upper() == 'Y':   # prompt the user to enter the following details: sutdent name, student id, course and section     studentname_213 = input("Enter Student Name: ")     studentid_213 = input("Enter Student ID: ")     course_213 = input("Enter Course & Section: ")       #print all the details entered by the user     print("\nStudent Name: ", studentname_213)     print("Student ID: ", studentid_213)     print("Course: ", course_213)     #wallet amount is set to 150     walletamount_213 = 150     addstudent_213 = input("Do you want to add another Student?(Y/N): ")         a_student = student_213.copy()     studentList_213.append(a_student)     for x in studentList_213:     for y in x.keys():         if y ==  studentid_213:             print(x.values()) anotherSTDNT_213 = 'Y' while anotherSTDNT_213.upper() == 'Y':     id = str(input("Enter Student ID: "))       for x in studentList_213:         for studentid_213 in x.values():             if  studentid_213 == id:                 print("ID VERIFIED!")                 #print student id                 print("Student ID: ", studentid_213)                 studenttmp_213 = x                           def menu ():         print ("Press 1: View the menu and the stocks.")         print ("Press 0: Proceed to a transaction.")         return input ("What would you like to do?: ")     run = menu ()

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question


 HOW TO KNOW IF MY INPUT/ STUDENT ID IS VERIFIED AND NOT VERIFIED, IF NOT, ASK THE USER AGAIN TO INPUT A STUDENT NUMBER
student_213 = {} # dictionary of student information

print ("\t\t\t\t-----------------------------------")
print ("\t\t\t\t|   Welcome to Tagumpay Canteen!  |")
print ("\t\t\t\t| Walk in Hungry, Walk out happy! |")
print ("\t\t\t\t-----------------------------------\n")

print ("\nPlease enter the following details: ")
# STORE MENU PRICE IN A DICTIONARY CALLED MENUPRICE_213
menuprice_213 = {'Soda':29.25, 'Bottled Water': 20, 'Coffee': 50, 'Tea': 35.50, 'Bread':15, 'Apple':20.50, 'Banana':15, 'Oranges': 25.1, 'Tapsilog':80.99, 'Porksilog':80.99}
# STORE MENU QUANTITY IN A DICTIONARY CALLED MENUQNTY_213
menuqnty_213 = {'Soda':4, 'Bottled Water': 4, 'Coffee': 2, 'Tea': 2, 'Bread':1, 'Apple':5, 'Banana':5, 'Oranges': 3, 'Tapsilog':5, 'Porksilog':4}

#store the user input in the dictionary named student_213
addstudent_213 = 'Y'
studentList_213 = [] # list of student information
studenttmp_213 = {} # temporary dictionary of student information
totalprice_213 = [] # list of total price of each student
#dictionary of student information is created, and the user is asked to enter the following details:
while addstudent_213.upper() == 'Y':
  # prompt the user to enter the following details: sutdent name, student id, course and section
    studentname_213 = input("Enter Student Name: ")
    studentid_213 = input("Enter Student ID: ")
    course_213 = input("Enter Course & Section: ")
 
    #print all the details entered by the user
    print("\nStudent Name: ", studentname_213)
    print("Student ID: ", studentid_213)
    print("Course: ", course_213)
    #wallet amount is set to 150
    walletamount_213 = 150


    addstudent_213 = input("Do you want to add another Student?(Y/N): ")
   
    a_student = student_213.copy()
    studentList_213.append(a_student)
   
for x in studentList_213:
    for y in x.keys():
        if y ==  studentid_213:
            print(x.values())
anotherSTDNT_213 = 'Y'
while anotherSTDNT_213.upper() == 'Y':
    id = str(input("Enter Student ID: "))
 
    for x in studentList_213:
        for studentid_213 in x.values():
            if  studentid_213 == id:
                print("ID VERIFIED!")
                #print student id
                print("Student ID: ", studentid_213)
                studenttmp_213 = x
       
 

           
    def menu ():
        print ("Press 1: View the menu and the stocks.")
        print ("Press 0: Proceed to a transaction.")
        return input ("What would you like to do?: ")
    run = menu ()
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Asymptotic Analysis
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education