fork download
  1. # Define list of numbers
  2. numbers = (10, 20, 30, 40, 50)
  3. # Calculate the sum of numbers
  4. total_sum=sum(numbers)
  5. # Calculate the average of numbers
  6. average=total_sum / len(numbers)
  7. # Display the results
  8. print("sum of the list:", total_sum)
  9. print("Average of the list:", average)
Success #stdin #stdout 0.05s 63412KB
stdin
Standard input is empty
stdout
('sum of the list:', 150)
('Average of the list:', 30)