Advertisement
Guest User

Untitled

a guest
Jan 27th, 2020
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. k = 1
  2. b = 0
  3. a = int(input("Введіть число: "))
  4. maximal = a
  5. minimal = a
  6. while a<0:
  7. print("Не допустимое значение")
  8. a = int(input("Введіть число: "))
  9. while a != 0:
  10. b+=a
  11. k+= 1
  12. maximal = a if maximal<a else maximal
  13. minimal = a if minimal>a else minimal
  14. a = int(input("Введіть число: "))
  15. while a<0:
  16. print("Не допустимое значение")
  17. a = int(input("Введіть число: "))
  18.  
  19. print(b, k, b/k, maximal, minimal)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement