Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Ask user for a list of integers. If user enters an integer, then append it into the list and ask for the next. If user

image text in transcribed
image text in transcribed
Ask user for a list of integers. If user enters an integer, then append it into the list and ask for the next. If user enters something else, then list is completed, stop asking for more. Output the amount of numbers, their sum, minimum and maximum. Then print all the numbers and their squares. Example: -uua. RESTART : E:/Ained/it-foundations-11/ex6umbers.py-aua.-.a Enter a number to add or something else to stop: 1 Enter a number to add or something else to stop: 2 Enter a number to add or something else to stop: 33 Enter a number to add or something else to stop: 4 Enter a number to add or something else to stop: Entered 4 numbers. They sum to 32 Minimum number is-4 Maximum number is 33 Their squares: 2 squares to 1 2 squares to 4 33 squares to 1089 -4 squares to 16 Possible algorithm (in pseudocode): Create an empty list numbers While True: Try to ask for an input and convert it into a number Break when got an exception (conversion error) Else append the number into numbers Output the amount of numbers, their sum, minimum and maximum For number in numbers: Print the number and its square

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

SQL Antipatterns Avoiding The Pitfalls Of Database Programming

Authors: Bill Karwin

1st Edition

1680508989, 978-1680508987

More Books

Students also viewed these Databases questions

Question

What is Larmors formula? Explain with a suitable example.

Answered: 1 week ago

Question

Understanding Group Leadership Culture and Group Leadership

Answered: 1 week ago