Advertisement
Arcot

ch7 ex3

Oct 20th, 2022
1,125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. def list_num(list_of_numbers):
  2.   sum=0
  3.   product=1
  4.   for i in list_of_numbers:
  5.     sum+=i
  6.     product*=i
  7.  
  8.   list_of_numbers.sort()
  9.  
  10.   return sum, product, list_of_numbers[-1]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement