Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def calcular_boleta(sala:str, zona:str, cliente:str, num_boletas:int)->dict:
- valor_boleta = 0
- if cliente=="adulto" and sala=="2d" and zona =="general":
- valor_boleta=9500
- elif cliente=="adulto" and sala=="2d" and zona =="preferencial":
- valor_boleta=12000
- elif cliente=="adulto" and sala=="3d" and zona =="general":
- valor_boleta=13000
- elif cliente=="adulto" and sala=="3d" and zona =="preferencial":
- valor_boleta=15000
- elif cliente=="niño" and sala=="2d" and zona =="general":
- valor_boleta=4750
- elif cliente=="niño" and sala=="2d" and zona =="preferencial":
- valor_boleta=6000
- elif cliente=="niño" and sala=="3d" and zona =="general":
- valor_boleta=6500
- elif cliente=="niño" and sala=="3d" and zona =="preferencial":
- valor_boleta=7500
- else:
- valor_boleta=0
- valor_pagar = valor_boleta*num_boletas
- salida = {"sala": sala, "zona":zona,
- "cliente":cliente,
- "num-boletas":num_boletas,
- "valor-unitario":valor_boleta,
- "total_pagado":valor_pagar}
- return salida
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement