Advertisement
Spocoman

Gymnastics

Feb 24th, 2022
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.03 KB | None | 0 0
  1. country = input()
  2. device = input()
  3. difficulty = 0
  4. performance = 0
  5.  
  6. if country == "Russia":
  7.     if device == "ribbon":
  8.         difficulty = 9.100
  9.         performance = 9.400
  10.     elif device == "hoop":
  11.         difficulty = 9.300
  12.         performance = 9.800
  13.     elif device == "rope":
  14.         difficulty = 9.600
  15.         performance = 9.000
  16.  
  17. elif country == "Bulgaria":
  18.     if device == "ribbon":
  19.         difficulty = 9.600
  20.         performance = 9.400
  21.     elif device == "hoop":
  22.         difficulty = 9.550
  23.         performance = 9.750
  24.     elif device == "rope":
  25.         difficulty = 9.500
  26.         performance = 9.400
  27.  
  28. elif country == "Italy":
  29.     if device == "ribbon":
  30.         difficulty = 9.200
  31.         performance = 9.500
  32.     elif device == "hoop":
  33.         difficulty = 9.450
  34.         performance = 9.350
  35.     elif device == "rope":
  36.         difficulty = 9.700
  37.         performance = 9.150
  38.  
  39. score = difficulty + performance
  40. print(f"The team of {country} get {score:.3f} on {device}.")
  41. print(f"{(20 - score) / 20 * 100:.2f}%")
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement