Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

All in Python. Q 1 . Get user input for a list of numbers. Write a program to turn every item of a list into

All in Python.
Q1. Get user input for a list of numbers. Write a program to turn every item of a list into its square. You cannot assume the size of the list. You must get the list of numbers from the user by using the concept of indefinite loop.
Q2. Part 1-
Prompt the user to enter four numbers, each corresponding to a person's weight in pounds. Store all weights in a list. Output the list.
Example:-
Enter weight 1:
236.0
Enter weight 2:
89.5
Enter weight 3:
176.0
Enter weight 4:
166.3
Weights: [236.0,89.5,176.0,166.3]
Part 2-
Output the average of the list's elements with two digits after decimal point. Hint: Use conversion specifier to output with a certain number of digits after the decimal point.
Part 3- Output the max list element with two digits after the decimal point
Part 4- Prompt the user for a number between 1 and 4. Output the weight at the user specified location.
Part 5- Sort the list's elements from least heavy to heaviest weights and output the sorted list.

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

ISBN: 1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

Detailed note on the contributions of F.W.Taylor

Answered: 1 week ago

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago