Advertisement
riff-raff

Suveniri

Nov 24th, 2018
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.52 KB | None | 0 0
  1. imeOtbor = input()
  2. vidSuvenir = input()
  3. broiZakupeniSuveniri = int(input())
  4.  
  5. obshtaSuma = 0
  6. cena = 0
  7.  
  8. if (imeOtbor == "Argentina"):
  9.     if (vidSuvenir == "flags"):
  10.         cena = 3.25
  11.     if (vidSuvenir == "caps"):
  12.         cena = 7.20
  13.     if (vidSuvenir == "posters"):
  14.         cena = 5.10
  15.     if (vidSuvenir == "stickers"):
  16.         cena = 1.25
  17.  
  18. elif (imeOtbor == "Brazil"):
  19.     if (vidSuvenir == "flags"):
  20.         cena = 4.20
  21.     if (vidSuvenir == "caps"):
  22.         cena = 8.50
  23.     if (vidSuvenir == "posters"):
  24.         cena = 5.35
  25.     if (vidSuvenir == "stickers"):
  26.         cena = 1.20
  27.  
  28. elif (imeOtbor == "Croatia"):
  29.     if (vidSuvenir == "flags"):
  30.         cena = 2.75
  31.     if (vidSuvenir == "caps"):
  32.         cena = 6.90
  33.     if (vidSuvenir == "posters"):
  34.         cena = 4.95
  35.     if (vidSuvenir == "stickers"):
  36.         cena = 1.10
  37.  
  38. elif (imeOtbor == "Denmark"):
  39.     if (vidSuvenir == "flags"):
  40.         cena = 3.10
  41.     if (vidSuvenir == "caps"):
  42.         cena = 6.50
  43.     if (vidSuvenir == "posters"):
  44.         cena = 4.80
  45.     if (vidSuvenir == "stickers"):
  46.         cena = 0.90
  47.  
  48. obshtaSuma = broiZakupeniSuveniri * cena
  49.  
  50. if (imeOtbor != "Argentina" and imeOtbor != "Croatia" and imeOtbor != "Denmark" and imeOtbor != "Brazil"):
  51.     print("Invalid country!")
  52.  
  53. elif (vidSuvenir != "flags" and vidSuvenir != "stickers" and vidSuvenir != "posters" and vidSuvenir != "caps"):
  54.     print("Invalid stock!")
  55.  
  56. else:
  57.     print(f"Pepi bought {broiZakupeniSuveniri} {vidSuvenir} of {imeOtbor} for {obshtaSuma:.2f} lv.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement