找回密码
 中文实名注册
查看: 166|回复: 6

【Python作业】任俊杰 实验小学 513

[复制链接]

8

主题

53

帖子

561

积分

高级会员

Rank: 4

积分
561
发表于 2022-8-21 17:35:28 | 显示全部楼层 |阅读模式
任俊杰实小
回复

使用道具 举报

8

主题

53

帖子

561

积分

高级会员

Rank: 4

积分
561
 楼主| 发表于 2023-7-13 17:24:43 | 显示全部楼层
[Python] 纯文本查看 复制代码
print('/\ \n/\ \n\/\n\/\n<\n>\n<\n>\nB\nA\nB\nA\n')
回复

使用道具 举报

8

主题

53

帖子

561

积分

高级会员

Rank: 4

积分
561
 楼主| 发表于 2023-4-1 17:37:12 | 显示全部楼层
[Python] 纯文本查看 复制代码
import turtle
import random
from tool import
turtle.setup(800,600)
tutu=turtle.Turtle()
turtle.speed(0)
turtle.pensize(10)
def rectangle(width,heigh):
    tutu.pendown()
    color_list = ['red', 'red', ' blue', 'red',
                  'red', 'white', 'white', 'white']
    tutu.fillcolor(random.choic(color_list))
    tutu.begin_fill()
    for i in range(2):
        tutu.forward(width)
        tutu.left(90)
        tutu.forward(heigh)
        tutu.left(90)
    tutu.end_fill()
    tutu.penup()
回复

使用道具 举报

8

主题

53

帖子

561

积分

高级会员

Rank: 4

积分
561
 楼主| 发表于 2023-4-1 17:31:05 | 显示全部楼层
[Python] 纯文本查看 复制代码
import turtle
import random
from tool import
turtle.setup(800,600)
tutu=turtle.Turtle()
turtle.speed(0)
turtle.pensize(10)
def rectangle(width,heigh):
    tutu.pendown()
    color_list = ['red', 'red', ' blue', 'red',
                  'red', 'white', 'white', 'white']
tutu.fillcolor((random.))

回复

使用道具 举报

8

主题

53

帖子

561

积分

高级会员

Rank: 4

积分
561
 楼主| 发表于 2022-9-25 17:17:51 | 显示全部楼层

U3第4课布尔乐园

本帖最后由 任俊杰1 于 2022-9-25 17:34 编辑

[Python] 纯文本查看 复制代码
age=input('hgp')
height=input('dff')
age=float(age)
height=float(height)
if age >=12 and height>=1.3:
    print('yes')
else:
    print('no')
回复

使用道具 举报

8

主题

53

帖子

561

积分

高级会员

Rank: 4

积分
561
 楼主| 发表于 2022-9-25 17:16:30 | 显示全部楼层

U3第4课布尔乐园

本帖最后由 任俊杰1 于 2022-9-25 17:32 编辑

[Python] 纯文本查看 复制代码
for i in range(200):
    if i >77 and i%2==1:
        print(i)
回复

使用道具 举报

8

主题

53

帖子

561

积分

高级会员

Rank: 4

积分
561
 楼主| 发表于 2022-8-21 17:36:20 | 显示全部楼层

U3第3课星际跳高

本帖最后由 任俊杰1 于 2022-9-25 17:34 编辑

[Python] 纯文本查看 复制代码
def jump(heigt,planet):
    if planet=='月球':
        result=heigt*6
    if planet == '火星':
        result = heigt*2.5
    if planet == '木星':
        result = heigt*0.4

    if planet == '老8星':
        result = heigt*88
setattr='你可以在'+planet+'跳'+str(result)+'m'
print(sentence)
jump(2, '老8星')
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-3-28 21:30 , Processed in 0.044625 second(s), 38 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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