Question: Do not use any built-in functions (i.e., max, min, sort, etc.) Do not use any built-in functions (i.e., max, min, sort, etc.) Write a Python

Do not use any built-in functions (i.e., max, min, sort, etc.)

Do not use any built-in functions (i.e., max, min, sort, etc.)

Write a Python program that prompts the user to input four numbers. The program should then output the numbers in ascending order. It is similar program as 3-2 and you will need to use a function to compare numbers and display the result within the function.

Your main program will take four numbers from users and call a function to sort them in ascending order. Then display the result from the function.

Do not use any built-in functions (i.e., max, min, sort, etc.)

1, 2, 3, 4

1, 2, 4, 3

1, 3, 2, 4

1, 3, 4, 2

1, 4, 2, 3

1, 4, 3, 2

2, 1, 3, 4

2, 1, 4, 3

2, 3, 4, 1

2, 3, 1, 4

2, 4, 1, 3

2, 4, 3, 1

3, 1, 2, 4

3, 1, 4, 2

3, 2, 1, 4

3, 2, 4, 1

4, 1, 2, 3

4, 1, 3, 2

4, 2, 1, 3

4, 2, 3, 1

4, 3, 1, 2

4, 3, 2, 1

This program output must be exactly the same as the output in the OUTPUT section,

Do not use any built-in functions (i.e., max, min, sort, etc.)

OUTPUT:

bold text is the user's input.

Please enter the first integer: 2 Please enter the second integer: 3 Please enter the third integer: 1 Please enter the fourth integer: 4 Output four integer numbers in ascending order: 1 2 3 4

Please enter the first integer: 3 Please enter the second integer: 4 Please enter the third integer: 2 Please enter the fourth integer: 1 Output four integer numbers in ascending order: 1 2 3 4

Please enter the first integer: 4 Please enter the second integer: 1 Please enter the third integer: 3 Please enter the fourth integer: 2 Output four integer numbers in ascending order: 1 2 3 4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!