Advertisement
Merucial

Untitled

Mar 22nd, 2020
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.03 KB | None | 0 0
  1. import math
  2. type_of_sushi = input()
  3. restaurant_name = input()
  4. portions = int(input())
  5. delivary = input()
  6. sum = 0
  7. percent = 0
  8.  
  9. is_restaurant_name = False
  10.  
  11. if type_of_sushi == 'sashimi':
  12.     if restaurant_name == 'Sushi Zone':
  13.         sum  = portions * 4.99
  14.         is_restaurant_name = True
  15.         if delivary == 'Y':
  16.             sum += sum * 0.2
  17.     if restaurant_name == 'Sushi Time':
  18.         sum  = portions * 5.49
  19.         is_restaurant_name = True
  20.         if delivary == 'Y':
  21.             sum += sum * 0.2
  22.     if restaurant_name == 'Sushi Bar':
  23.         sum  = portions * 5.25
  24.         is_restaurant_name = True
  25.         if delivary == 'Y':
  26.             sum += sum * 0.2
  27.     if restaurant_name == 'Asian Pub':
  28.         sum  = portions * 4.50
  29.         is_restaurant_name = True
  30.         if delivary == 'Y':
  31.             sum += sum * 0.2
  32.  
  33. if type_of_sushi == 'maki':
  34.     if restaurant_name == 'Sushi Zone':
  35.         sum  = portions * 5.29
  36.         is_restaurant_name = True
  37.         if delivary == 'Y':
  38.             sum += sum * 0.2
  39.     if restaurant_name == 'Sushi Time':
  40.         sum  = portions * 4.69
  41.         is_restaurant_name = True
  42.         if delivary == 'Y':
  43.             sum += sum * 0.2
  44.     if restaurant_name == 'Sushi Bar':
  45.         sum  = portions * 5.55
  46.         is_restaurant_name = True
  47.         if delivary == 'Y':
  48.             sum += sum * 0.2
  49.     if restaurant_name == 'Asian Pub':
  50.         sum  = portions * 4.80
  51.         is_restaurant_name = True
  52.         if delivary == 'Y':
  53.             sum += sum * 0.2
  54.  
  55. if type_of_sushi == 'uramaki':
  56.     if restaurant_name == 'Sushi Zone':
  57.         sum  = portions * 5.99
  58.         is_restaurant_name = True
  59.         if delivary == 'Y':
  60.             sum += sum * 0.2
  61.     if restaurant_name == 'Sushi Time':
  62.         sum  = portions * 4.49
  63.         is_restaurant_name = True
  64.         if delivary == 'Y':
  65.             sum += sum * 0.2
  66.     if restaurant_name == 'Sushi Bar':
  67.         sum  = portions * 6.25
  68.         is_restaurant_name = True
  69.         if delivary == 'Y':
  70.             sum += sum * 0.2
  71.     if restaurant_name == 'Asian Pub':
  72.         sum  = portions * 5.50
  73.         is_restaurant_name = True
  74.         if delivary == 'Y':
  75.             sum += sum * 0.2
  76.  
  77. if type_of_sushi == 'temaki':
  78.     if restaurant_name == 'Sushi Zone':
  79.         sum  = portions * 4.29
  80.         is_restaurant_name = True
  81.         if delivary == 'Y':
  82.             sum += sum * 0.2
  83.     if restaurant_name == 'Sushi Time':
  84.         sum  = portions * 5.19
  85.         is_restaurant_name = True
  86.         if delivary == 'Y':
  87.             sum += sum * 0.2
  88.     if restaurant_name == 'Sushi Bar':
  89.         sum  = portions * 4.75
  90.         is_restaurant_name = True
  91.         if delivary == 'Y':
  92.             sum += sum * 0.2
  93.     if restaurant_name == 'Asian Pub':
  94.         sum  = portions * 5.50
  95.         is_restaurant_name = True
  96.         if delivary == 'Y':
  97.             sum += sum * 0.2
  98.  
  99. if is_restaurant_name == True:
  100.     print(f'Total price: {math.ceil(sum)} lv. ')
  101. else:
  102.     print(f'{restaurant_name} is invalid restaurant!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement