Advertisement
Arcot

ch5 ex3

Oct 20th, 2022
873
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. abc = [345, 234, 897, 123, 675, 4365, 8876, 23, 59, 88]
  2.  
  3. sum=0
  4. product=1
  5. for i in abc:
  6.   sum+=i
  7.   product*=i
  8.  
  9. #sorting the list
  10. abc.sort()
  11.  
  12. print("Sum of the list is",sum)
  13. print("product of the list is",product)
  14. print("Maximum number of list",abc[-1])
  15. print("Minimum number of list",abc[0])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement