Page 389 - Computer Science Class 11 With Functions
P. 389

menu()

                  def accept():
                      '''
                      Objective: To accept data
                      Input Parameters: None
                      Return Value: None
                      '''


                      schoolName = input("Enter the School Name :  ")

                      choice = 1

                      while choice == 1:
                          eventName = input("Enter the Event Name : ")
                          if eventName not in events:
                              print("Sorry... we are not hosting this event.")
                              choice = int(input("Press 1 to enter Event again or 2 to Exit"))
                              if choice == 1:
                                  continue
                              else:
                                  return
                          else:
                              break
                      position = int(input("Enter Position :  "))
                      if position == 1:
                          points = 10
                      elif position == 2:
                          points = 5
                      elif position == 3:
                          points = 3
                      else:
                          points = 0

                      detailList = [eventName, position, points]
                      pointsTally[schoolName] = detailList
                      menu()


                  menu()













                                                                                                   Dictionaries  387
   384   385   386   387   388   389   390   391   392   393   394