dosfilth

Untitled

Mar 18th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. def calculate():
  2. total=0
  3. min=0
  4. max=0
  5. for i in range (10):
  6. x=int(input("input number "+str(i)+" : "))
  7. total = total+x
  8. if i==1:
  9. min=x
  10. max=x
  11. else:
  12. if x<min:
  13. min=x
  14.  
  15. elif x>max:
  16. max=x
  17.  
  18. average= total/10
  19. print(average)
  20. print(min)
  21. print(max)
Advertisement
Add Comment
Please, Sign In to add comment