Advertisement
cardel

Untitled

Jun 15th, 2022
360
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. def cliente(informacion:dict):
  2.  
  3. id_cliente = informacion["id_cliente"]
  4. nombre = informacion["nombre"]
  5. edad = informacion["edad"]
  6. Primer_ingreso = informacion["primer_ingreso"]
  7. total_boleta = 0
  8. apto = True
  9. atraccion = ""
  10. if edad >18:
  11. atraccion = "X-Treme"
  12. apto = True
  13. valor_boleta = 20000
  14. if Primer_ingreso == True:
  15. total_boleta = valor_boleta * 0.95
  16. else:
  17. total_boleta = 20000
  18. elif edad >=15 and edad <=18:
  19. atraccion = "Carros chocones"
  20. apto = True
  21. valor_boleta = 5000
  22. if Primer_ingreso == True:
  23. total_boleta = valor_boleta * 0.93
  24. else:
  25. total_boleta = 5000
  26. elif edad >=7 and edad <15:
  27. atraccion = "Sillas voladoras"
  28. apto = True
  29. valor_boleta = 10000
  30. if Primer_ingreso == True:
  31. total_boleta = valor_boleta * 0.95
  32. else:
  33. total_boleta = 10000
  34. else:
  35. valor_boleta = 0
  36. atraccion = "N/A"
  37. apto = False
  38. total_boleta = "N/A"
  39.  
  40. salida = {"nombre":informacion["nombre"],"edad":informacion["edad"],"atraccion":atraccion,"apto":apto,"primer_ingreso":informacion["primer_ingreso"],"total_boleta":total_boleta,
  41. }
  42.  
  43. return salida
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement