+ 14
Need code on Python
User chooses 5 numbers. ex: a=1 b=3 c=7 d=4 e=2 Program doing this: c>d>b>e>a Can anyone write a code like this with input?
6 Respostas
+ 23
U mean like this 👇
https://code.sololearn.com/caI5M4DUsp93/?ref=app
+ 4
You want to sort them?Or you want to find max?
+ 4
YOU can! input numbers with separator. put it into a list. use sort method. print it formatted.
+ 3
numbers = sorted(list(input()))
result = ""
for x in range(len(numbers)):
result = result + numbers[x]
print(result)
http://www.sololearn.com/app/JUMP_LINK__&&__python__&&__JUMP_LINK/playground/cDWYZWeYBJE5/
+ 2
Using sort() should work, but you can also take a look at this:
https://www.sololearn.com/learn/774/
+ 2
list = [1,3,7,4,2]
list.sort(reverse = True)
print( "sorted list is:" ,list)
this will work