Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 ( 1 mark ) : Write a program to ask the user to enter a series of integers, ending with a - 1

Question 1(1 mark): Write a program to ask the user to enter a series of integers, ending with a -1. Sort the list of numbers and then print them out in ascending order along with their total.
Question 1(1 mark): Write a program to ask the user to enter a series of integers, ending with a -1. Sort the list of numbers and then print them out in ascending order along with their total.
REQUIREMENTS
Your program must use a list to store the numbers.
The user input is always correct (input verification is not required).
Your code must be based only on the materials covered in weeks 1 to 10 of the course.
Your output must appear exactly like the following example (the text in bold indicates the user input).
Sample Output:
Enter your integers (-1 to end)
Integer 1: 7
Integer 2: 2
Integer 3: 8
Integer 4: 5
Integer 5: -1
Your sorted list is 2578
Your total is 22
image text in transcribed

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

Students also viewed these Databases questions

Question

Specify how risk aversion influences required rates of return?

Answered: 1 week ago