Commit 772ee7e3 by BellCodeEditor

auto save

parent 7f9f3c44
Showing with 30 additions and 8 deletions
alist = [88, 75, 72, 82, 90, 85, 78, 91]
k=len(alist)
for i in range(0,k-1):
for j in range(0,k-1):
if alist[j]>alist[i]:
alist[j],alist[j+1]=alist[j+1],alist[j]
print(alist)
\ No newline at end of file
import turtle as t
import random as r
t.setup(100,100)
t.screensize(100,100,"blue")
def draw_circle(radius,color,y_position):
t.penup()
t.pensize(5)
t.fillcolor(color)
t.goto(0,y_position)
t.pendown()
t.begin_fill()
t.circle(radius)
t.end_fill()
def draw_bullet():
t.penup()
t.goto(r.randint(-200,200),r.randint(-200,200))
t.pendown()
t.dot(50)
draw_circle(200,'yellow',-200)
draw_circle(150,'red',-150)
draw_circle(100,'black',-100)
draw_circle(50,'white',-50)
for _ in range(5):
draw_bullet()
t.hideturtle()
t.done
\ 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 sign in to comment