Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Lesson 4 HW
#python 3.5.2 #------------------------------------------------------------ def x(y): length=len(y) p=0 while p<length: p=p+1 print ('p: ', p) i=0 while i<((length-1)-p): i=i+1 print ('Possible values for i:',i) if y[i] > y[i+1]: temp = y[i] y[i] = y[i+1] y[i+1] = temp print (i,'-->',y) print () print ('------------------------------------------------') return y Input=[3,1,1,5,2] print('y=',Input) R=x(Input) print('R=',R)
run
|
edit
|
history
|
help
0
Iam hungry
try1
PyTeleBook
(P3) Starsza data
json array object loop
Print lists separated by comma
Convert to lowercase
31 dec
matrix with random numbers
PyPackMenuClass