Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import randint
- A=[randint (0,100) for i in range (10)]
- print (A)
- M = A[0]
- count1=0
- for i in range(1,10):
- if A[i] > M:
- M = A[i]
- count1=i
- print ("A[", count1 , "]=", M, sep="" )
- M = A[0]
- count2=0
- for i in range(1,10):
- if A[i] < M:
- M = A[i]
- count2=i
- print ("A[", count2 , "]=", M, sep="" )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement