#Again, help me with CodeWars.

17 messages · Page 1 of 1 (latest)

warm charm
#

What the fuck?

#

My brother in christ, how about you:

  1. Turn the numbers (spaced) into a list of actual numbers in Python
  2. Loop through the list keeping track of the smallest element in a variable (if the current one is smaller, set the smallest element to be the current one)
  3. Return smallest element
eternal sequoia
#

where are you learning python from?

olive oasis
#

str(list(number))

#

you made number a string?

#

no no

#

idk python but looks like transition = number that user input as a string and you used for loop in that list sort it?

#

and returned i index 0?

#

take harvard 50

#

mate gonna save your live

#

and how did you end up in code war

#

or whatever that is

eternal sequoia
#

I am not sure if you understand the concepts... you should try to follow a course or read a book and try out some exercises

#

!r python

junior compassBOT
eternal sequoia
#

I recommend Automate the boring stuff if you are into books. It has exercises and projects to enforce your learning

lime crescent
#

@ebon topaz You would really benefit from learning how to solve your problems in English first, and then translating English into code. The code you have written indicates you don't really understand what it is doing.
For example, consider the first line:

transition = str(list(number))

In English, this can be said: Convert number to a list, convert the result of that into a string, and then place that value into the variable transition.
All lines of code can be explained in English this way.