Monday 11 January 2016

15 The Cashier script (with time.sleep)

#1 Let´s import a toy that we will use later
import time

#2 Print and wait 1 second and print and...
print ('What would you like to eat, sir/madam?')
print ('    ')
time.sleep(2)

print ('We have:')
time.sleep(2)

print ('First course:')
print ('    Soup, paella, spaghetti and elf_cream')
print ('    ')
time.sleep(4)

print ('Second course:')
print ('    Meat_balls, Chicken_wings and elf_eyes')
print ('    ')
time.sleep(4)

print ('Dessert:')
print ('    Ice_cream, icy_tea, elf_nostrils')
print ('    ')
time.sleep(4)

print (' Type what you wish')
time.sleep(2)
print ('for example: Soup + Meatballs + Icy_tea. Don´t forget the capital letter')
time.sleep(2)

print ('Then click ENTER')


#3 Now tell Python your prices:
Soup = 5.34
Paella = 6.32
Spaghetti = 5.37
Elf_cream = 60.00
Meat_balls = 8.45
Chicken_wings = 4.20
Elf_eyes = 7.00
Ice_cream = 3.73
Icy_tea = 2.80
Elf_nostrils = 10.20