0

I have a question for python developers

I want to ask that how can we create a program which takes an input of several numbers through and sorts the received data in a specific manner ... Please explain and I want to ask that when we execute it, it sorts them in a shuffling graphic does it require CSS ?? Please comment the code Thank you 😊❤️

24th Jun 2020, 4:13 PM
Kishlay
Kishlay - avatar
3 ответов
+ 2
I'll give you a couple of clues. Python has a lot of built-in functions that can complete your task. First, if your input is similar to this: 3 4 7 5 6 You can use split() to convert it into a list, E.G: arr = input().split() Another useful function is sorted(), which sorts a list of numbers in order. All you have to do is run sorted() on a list: sorted([2, 5, 4, 3]) The output will be: [2, 3, 4, 5] If you print it. Also, Python has nearly nothing to do with CSS. If you want to create a shuffling animation in Sololearn, you'll need some knowledge of HTML, CSS, and Javascript.
24th Jun 2020, 4:59 PM
Jianmin Chen
Jianmin Chen - avatar
25th Jun 2020, 2:03 AM
Kishlay
Kishlay - avatar