Course Hero Logo

BarberShop.py - import datetime now =...

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 1 - 2 out of 2 pages.

import datetimenow = datetime.datetime.now()today8am = now.replace (hour=8, minute = 0, second = 0,microsecond = 0)today745pm = now.replace (hour = 19, minute = 45, second = 0, microsecond = 0)#######customerlist = []barberlist = []customertime = []barbertime = []while now > today8am and now < today745pm:while True:menu = input('Please choose from the following menu options:\n 1. Enter acustomer \n 2. Remove a customer \n 3. Clock in barber \n 4. Clock out barber\n ')if menu =='1':name = input('Enter customers name: ')customerlist.append(name)customerlistdex= customerlist.index(name)print(name, 'was checked in at',datetime.datetime.now())print('The wait time is',12 *len(customerlist) /len(barberlist),'minutes.')print ('Customer List =', customerlist)customertime.append(datetime.datetime.now())if len(customerlist) == 0 and len(barberlist) == 0:print('There is no one in front of you.')elif len(customerlist) == 0 and len(barberlist) > 0:print(barberlist, 'are in the shop.')elif len(barberlist) == 0 and len(customerlist) > 0:print(customerlist, 'are in the shop.')else:print(customerlist, 'and', barberlist, 'are in the shop.')if menu =='2':rname = input('Enter customers name you wish to remove: ')customerlist.remove(rname)print(rname, 'has been removed at',datetime.datetime.now())

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 2 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
Haynes,S
Tags
Consultative selling, barber, Samuel Barber, barberlist

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture