Commit 34f89265 authored by cermak's avatar cermak
Browse files

Lesson 5

parent a25c858d
Pipeline #17166 failed with stage
in 3 minutes and 12 seconds
#!/usr/bin/env python3
# Třídění probubláváním
x = [31, 41, 59, 26, 53, 58, 97]
x = [31, 41, 59, 26, 53, 58, 5, 6]
n = len(x)
for i in range(n):
for j in range(n-1):
bublal = True
while bublal:
bublal = False
for j in range(len(x)-1):
if x[j] > x[j+1]:
x[j], x[j+1] = x[j+1], x[j]
bublal = True
# když to odkomentuji, uvidím jak pěkně mi to bublá:
# # print(x)
print(x)
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment