Advertisement
Spocoman

05. Orders

Jan 25th, 2022
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. product = input()
  2. quantity = int(input())
  3.  
  4. def result():
  5.     price = {"coffee": 1.5, "coke": 1.4, "water": 1, "snacks": 2}[product] * quantity
  6.     return price
  7.  
  8. print(f"{result():.2f}")
  9.  
  10.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement