Guest User

Untitled

a guest
Sep 14th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. def main():
  2. maara = int(input("Enter the number of measurements: "))
  3.  
  4. if maara <= 0:
  5. print("The number of measurements must be a positive number.")
  6.  
  7. else:
  8. lampo_ed = 22
  9. huono = 0
  10. for i in range(1, maara + 1):
  11. lampo = int(input("Enter the temperature {}: ".format(i)))
  12.  
  13. if lampo < 20 or lampo > 25:
  14. huono += 1
  15.  
  16. if lampo_ed < 20 or lampo_ed > 25:
  17. print("Your wine is ruined.")
  18. break
  19.  
  20. elif huono > 0.1 * maara:
  21. print("Your wine is ruined.")
  22. break
  23.  
  24. elif i == maara:
  25. print("Your wine is ready.")
  26.  
  27. lampo_ed = lampo
  28.  
  29.  
  30. main()
Add Comment
Please, Sign In to add comment