diff --git a/내림차순 b/내림차순 new file mode 100644 index 0000000..d762faa --- /dev/null +++ b/내림차순 @@ -0,0 +1,29 @@ +import random +r=random.randint(1, 10) +a=0 +b=0 +c=0 +t=0 +u=0 +list=[] + +while t<4: + r=random.randint(1, 10) + list.append(r) + t+=1 + +print(list) + +t=0 +while tlist[u]: + c = list[t] + list[t] = list[u] + list[u] = c + u+=1 + t+=1 + + +print(list) \ No newline at end of file