YankoGrancharov

frutMarket

Jun 5th, 2017
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.64 KB | None | 0 0
  1. frut = input().lower()
  2. dey = input().lower()
  3. col = float(input())
  4. prais = -1
  5. if (dey == "monday") or (dey == "tuesday") or dey == ("wednesday") or dey == ("thursday") or dey == "friday":
  6.     if frut == "banana":
  7.         prais = 2.5
  8.         print("{0:.2f}".format(prais * col))
  9.     elif frut == "apple":
  10.         prais = 1.2
  11.         print("{0:.2f}".format(prais * col))
  12.     elif frut == "orange":
  13.         prais = 0.85
  14.         print("{0:.2f}".format(prais * col))
  15.     elif frut == "grapefruit":
  16.         prais = 1.45
  17.         print("{0:.2f}".format(prais * col))
  18.     elif frut == "kiwi":
  19.         prais = 2.7
  20.         print("{0:.2f}".format(prais * col))
  21.     elif frut == "pineapple":
  22.         prais = 5.5
  23.         print("{0:.2f}".format(prais * col))
  24.     elif frut == "grapes":
  25.         prais = 3.85
  26.         print("{0:.2f}".format(prais * col))
  27.     else:
  28.         print ("error")
  29.  
  30. elif dey == "saturday" or dey == "sunday":
  31.     if frut == "banana":
  32.         prais = 2.7
  33.         print("{0:.2f}".format(prais * col))
  34.     elif frut == "apple":
  35.         prais = 1.25
  36.         print("{0:.2f}".format(prais * col))
  37.     elif frut == "orange":
  38.         prais = 0.9
  39.         print("{0:.2f}".format(prais * col))
  40.     elif frut == "grapefruit":
  41.         prais = 1.6
  42.         print("{0:.2f}".format(prais * col))
  43.     elif frut == "kiWi":
  44.         prais = 3.0
  45.         print("{0:.2f}".format(prais * col))
  46.     elif frut == "pineapple":
  47.         prais = 5.6
  48.         print("{0:.2f}".format(prais * col))
  49.     elif frut == "grapes":
  50.         prais = 4.20
  51.         print("{0:.2f}".format(prais * col))
  52.     else:
  53.         print ("error")
  54. else:
  55.     print ("error")
Advertisement
Add Comment
Please, Sign In to add comment