Commit 1d93037b by BellCodeEditor

auto save

parent 3b83c8ff
Showing with 19 additions and 5 deletions
import turtle
a = input("please")
a = int(a)
b = 0
while True:
if a != 1:
if a%2 == 1:
a = a*3+1
else:
a /= 2
b += 1
else:
break
print(b)
exit()
\ No newline at end of file
...@@ -72,13 +72,11 @@ while True: ...@@ -72,13 +72,11 @@ while True:
# 将贪吃蛇的身体画上去 # 将贪吃蛇的身体画上去
for i in range(len(position)-1): for i in range(len(position)-1):
screen.blit(body, position[i]) screen.blit(body, position[i])
# 将果实画上去 # 将果实画上去
screen.blit(food, (a,b)) screen.blit(food, (a,b))
info = "Score :" + str(score) info = "Score:" + str(score)
text = z.render(info,True,(0,0,0)) text = z.render(info,True,(0,0,0))
screen.blit(text,(540,10)) screen.blit(text,(540,10))
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
FPSCLOCK.tick(3) FPSCLOCK.tick(3)
print(a,b) \ No newline at end of file
\ 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