Exp 4 python

0

 Create a program that prompts the user for a list of numbers and then sorts them in ascending order. 



numbers = input("Enter a list of numbers separated by spaces: ").split()

numbers = [int(num) for num in numbers]

sorted_numbers = sorted(numbers)

print("Sorted numbers in ascending order:", sorted_numbers)

Post a Comment

0Comments

GUYS IF YOU HAVE ANY DOUBT. PLEASE LET ME KNOW

Post a Comment (0)