| Ex No: 18 | Conditional and Looping Statements |
|---|---|
| Aim: | To write a python program using Conditional and Looping Statements. |
| Algorithm | |
| Step1: Get input for number of values. | |
| Step2: Get the numbers using while loop and add it to list. | |
| Step3: Display Entered List using for loop. | |
| Step4: Sort the list using nested for loops. | |
| A) Check for larger number in list and swap the numbers. | |
| Step5: Display the sorted list values. | |
| Source Code | |
|
|
| Result: | Thus a python program is written using constional and looping statements. |