找回密码
 中文实名注册
查看: 267|回复: 2

任俊杰1

[复制链接]

8

主题

53

帖子

578

积分

高级会员

Rank: 4

积分
578
发表于 2022-5-29 17:12:33 | 显示全部楼层 |阅读模式
我叫任俊杰1
回复

使用道具 举报

8

主题

53

帖子

578

积分

高级会员

Rank: 4

积分
578
 楼主| 发表于 2022-7-10 16:58:12 | 显示全部楼层
while True:
    chinese = input('请输入语文分数:')
    maths = input('请输入数学分数: ')
    english = input('请输入英语分数: ')
    chinese = int(chinese)
    maths = int(maths)
    english = int(english)
    total = (chinese + maths + english)/3
    print(total)
    if total > 90:
        print('你是满级人类!!!!!!!!!!!!!!!!!!!')
    elif total > 80:
        print('加油!!!!!!!!!!!!')
    else:
        print('差!!!!!!!!!!!!')
回复

使用道具 举报

8

主题

53

帖子

578

积分

高级会员

Rank: 4

积分
578
 楼主| 发表于 2023-6-11 17:11:08 | 显示全部楼层
[Python] 纯文本查看 复制代码
snake_list = [[400, 400], [420, 400], [440, 400], [460, 400], [480, 400]]
for position in snake_list:
    print(position)

if event.type==pygame.KEYDOWN:
    if event.key==pygame.K_UP:
        direction='up'
    if event.key == pygame.K_DOWN:
        direction = 'down'
    if event.key == pygame.K_LEFT:
        direction = 'left'
    if event.key == pygame.K_RIGHT:
        direction = 'right'
if direction=='up':
    head_x=snake_list[0][0]
    head_y=snake_list[0][1]-20
    head=[head_x,head_y]
    snake_list,insert(0,head)
    snake_list.pop()
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 中文实名注册

本版积分规则

小黑屋|东台市机器人学会 ( 苏ICP备2021035350号-1;苏ICP备2021035350号-2;苏ICP备2021035350号-3 )

GMT+8, 2024-4-26 05:36 , Processed in 0.040309 second(s), 28 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表