Computer Science, asked by Chichi18, 9 months ago

WAP that reads 'n' numbers and prints them in ascending order(python coding)(please give an easy to understand coding)

Answers

Answered by chiefprashant
2

Answer:

#Python

Explanation:

#making an empty list

alist = [ ]

#taking input

n = int(input("no. of numbers"))

for I in range(n):

num = int(input("no. "))

alist.append(num)

#arranging them in ascending order

sorted(alist)

#print them one by one

for I in range(n):

print(alist[n])

Answered by gaganadithyareddy9
0

Answer:

Hey! Here is your python code...

x = int(input("How many numbers? "))

nums = [ ]

for i in range(x):

   x = int(input("Enter a number: "))

   nums.append(x)

   

nums.sort()

for i in nums:

   print(i, end=', ')

# HOPE THIS HELPS YOU!!

Similar questions