help me im bad python coder /u/Human_Anxiety8599 Python Education

hi everybody.
Today in class we had an exercice that i didint maanage to conplete. Here it is, hoping som1 can help 🙂

def tri_selection(tab):

t=list(tab)

for j in range(len(t)):

m=tab[j]

pos = j

for i in range(j,len(t)):

if m>tab[i]:

m=tab[i]

pos = i

[j] = pos

i = [j]

the task was

write a def named tri_selection(tab) that put in an ascending order the numbers present in the list : tab

it is important to keep a copy of the tab and to return that copy

submitted by /u/Human_Anxiety8599
[link] [comments]

​r/learnpython hi everybody. Today in class we had an exercice that i didint maanage to conplete. Here it is, hoping som1 can help 🙂 def tri_selection(tab): t=list(tab) for j in range(len(t)): m=tab[j] pos = j for i in range(j,len(t)): if m>tab[i]: m=tab[i] pos = i [j] = pos i = [j] the task was write a def named tri_selection(tab) that put in an ascending order the numbers present in the list : tab it is important to keep a copy of the tab and to return that copy submitted by /u/Human_Anxiety8599 [link] [comments] 

hi everybody.
Today in class we had an exercice that i didint maanage to conplete. Here it is, hoping som1 can help 🙂

def tri_selection(tab):

t=list(tab)

for j in range(len(t)):

m=tab[j]

pos = j

for i in range(j,len(t)):

if m>tab[i]:

m=tab[i]

pos = i

[j] = pos

i = [j]

the task was

write a def named tri_selection(tab) that put in an ascending order the numbers present in the list : tab

it is important to keep a copy of the tab and to return that copy

submitted by /u/Human_Anxiety8599
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *