Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a function in Python, called PrintThem(ls) that takes a list variable ls as argument. It then prints out the sum, the maximum, and the

Write a function in Python, called PrintThem(ls) that takes a list variable ls as argument. It then prints out the sum, the maximum, and the minimum of all elements in the list, each on separate lines and each with an announcement, like this sample run below. The function prints these things without returning any value. You can safely assume that the variable ls will always just include integer numbers (you dont have to check for that).

>>> x = [5, 2, 10, 7]

>>> PrintThem(x)

The sum is: 24

The max is: 10

The min is: 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management System MCQs Multiple Choice Questions And Answers

Authors: Arshad Iqbal

1st Edition

1073328554, 978-1073328550

More Books

Students also viewed these Databases questions