Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import datetime
- customer_feedbacks = []
- customer_feedback_dict = {
- 'id': 0,
- 'date': datetime.time(0, 0),
- 'ambience': 0,
- 'service': 0,
- 'food': 0,
- 'hygiene': 0
- }
- i = -1
- menu_exit = False
- # CREATING FOR LOOP TO TAKE INPUT FROM CUSTOMERS
- while not menu_exit:
- customer_feedbacks.append(dict(customer_feedback_dict))
- i += 1
- print('---------------------------------------------------------------------------------------------------')
- print("* Welcome to Cloud Akali! *")
- print("please follow the instructions below to complete the customer survey and rate out of 10! ")
- customer_feedbacks[i]['id'] = int(input("Enter bill no. (01-05) : "))
- customer_feedbacks[i]['date'] = datetime.datetime.strptime(
- input('Enter date of visit: '),
- '%d/%m/%Y'
- )
- customer_feedbacks[i]['ambience'] = int(input('How did you like the overall ambience of the restaurant? : '))
- customer_feedbacks[i]['service'] = int(input("How would you rate our service? : "))
- customer_feedbacks[i]['food'] = int(input("What did you think about our food? : "))
- customer_feedbacks[i]['hygiene'] = int(input('Did our restaurant meet your standard of cleanliness and hygiene? : '))
- menu_exit = input('Question 4/4, type "yes" to proceed: ').lower() != 'yes'
- print('---------------------------------------------------------------------------------------------------')
- customer_feedbacks = sorted(customer_feedbacks, key= lambda i: i['date'])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement