Advertisement
Guest User

Untitled

a guest
Mar 28th, 2020
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. a = [32, 37, 28, 30, 37, 25, 27, 24, 35, 55, 23, 31, 55, 21, 40, 18, 50, 35, 41, 49, 37, 19, 40, 41, 31]
  2.  
  3. max = a[0]
  4. min = a[0]
  5.  
  6. for i in a[1:]:
  7.     if i > max:
  8.         max = i
  9.     if i < min:
  10.         min = i
  11.  
  12. print("Maximum :" + str(max))
  13. print("Minimum :" + str(min))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement