Python program to sort elements in ascending order

1494
python program to sort elements in ascending order
a=int(input("Enter first number: "))
b=int(input("Enter second number: "))
c=int(input("Enter third number: "))
min=mid=max=None
if a<b and a<c:
  if b<c:
      min,mid,max=a,b,c
  else:
      min,mid,max=a,c,b
elif b<a and b<c:
  if a<c:
     min,mid,max=b,a,c
  else:
     min,mid,max=b,c,a
else:
  if a<b:
     min,mid,max=c,a,b
  else:
     min,mid,max=c,b,a
print("Number in ascending order: ",min,mid,max)

     Output:
            Enter first number: 10
            Enter second number: 8
            Enter third number: 14
            Number in ascending order:  8 10 14

इन्हें भी देखें।

Python Programs के लिये यहाँ click करें।

 

Python program to sort elements in ascending order program to sort elements in ascending order in python how to sort the elements in descending order in python sort elements in ascending order in python sort in ascending order in python how to sort in ascending order in python ascending order program ascending order program in python write a program to sort elements in ascending order write a program to sort elements in ascending order in python Python program to sort elements in ascending order estudyhelper Python program to sort elements in ascending order estudyhelper.xyz