m = 0
x = 10
k = 1
direct = 1
y = 0
while 1:
for event in pygame.event.get():
if event.type == pygame.QUIT:
sys.exit()
pygame.draw.rect(sc, (255, 255, 255), (x,y,1, 1))
print(x)
if x < 250 and direct == 1:
y = x
x = x + 1
else:
direct = 2
if direct == 2:
y = y - 1
x = x + 1
pygame.time.delay(5)
pygame.display.update()