Facebook
From Sole Moth, 2 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 88
  1. import os
  2.  
  3. def verificar(dato):
  4.     while dato == "":
  5.         print("Error, valor vacio!")
  6.         dato = input("Ingrese nuevamente: ")
  7.     return dato
  8.  
  9.  
  10. def convertir(valor):
  11.     while valor.isdecimal() == False:
  12.         print("Error, solo numeros enteros")
  13.         valor = input("Ingrese nuevamente: ")
  14.     valor = int(valor)
  15.     return valor
  16.  
  17.  
  18. def menu():
  19.  print(
  20. """
  21. McDowell´s
  22. Recuerda que siempre hay que recibir al cliente con una sonrisa :)
  23.        
  24. 1 – Ingreso de nuevo pedido
  25. 2 – Cambio de turno
  26. 3 – Apagar sistema        
  27.          
  28. """)
  29.  
  30. ####################################################################################################
  31.  
  32. while True:
  33.     print("Bienvenido a McDowell´s ")
  34.     encargado = input("Ingrese su nombre encargad@: ")
  35.     menu()
  36.          
  37.     opcion = input(">>> ")
  38.     opcion = verificar(opcion)
  39.     opcion = convertir(opcion)
  40.  
  41.     csimple = 650
  42.     cdoble  = 700
  43.     ctriple = 800
  44.     flurby  = 250
  45.    
  46.  
  47.     while opcion == 1:
  48.         s = input("Ingrese cantidad Combo S: ")
  49.         s = verificar(s)
  50.         s = convertir(s)
  51.         d = input("Ingrese cantidad Combo D: ")
  52.         d = verificar(d)
  53.         d = convertir(d)
  54.         t = input("Ingrese cantidad Combo T: ")
  55.         t = verificar(t)
  56.         t = convertir(t)
  57.         f = input("Ingrese cantidad Flurby: ")
  58.         f = verificar(f)
  59.         f = convertir(f)
  60.  
  61.         totals = s*csimple
  62.         totald = d*cdoble
  63.         totalt = t*ctriple
  64.         totalf = f*flurby                                          
  65.                                
  66.         total_total = totals + totald + totalt + totalf
  67.         print("total:", total_total)                                            
  68.        
  69.         abona = input("Abona con $ >>> ")
  70.         abona = verificar(abona)
  71.         abona = convertir(abona)
  72.  
  73.         vuelto = abona - total_total
  74.         print("vuelto: ", vuelto)
  75.  
  76.         menu()
  77.         opcion = input(">>> ")
  78.         opcion = verificar(opcion)
  79.         opcion = convertir(opcion)
  80.  
  81.         os.system("cls")
  82.    
  83.     if opcion == 2:
  84.         pass
  85.  
  86.     elif opcion == 3:  
  87.         print("adios")
  88.         break
  89.  
  90.  
  91.