Write a code in Python to input three numbers and arrange them in ascending order using if, else and elif statement
Answers
Answered by
6
Explanation:
Python Program to Sort List in Ascending Order
NumList = []
Number = int(input("Please enter the Total Number of List Elements: "))
for i in range(1, Number + 1):
value = int(input("Please enter the Value of %d Element : " %i))
NumList.append(value)
NumList.sort()
print("Element After Sorting List in Ascending Order is : ", NumList)
Similar questions