猫史档案馆


小麦做的面包

小麦做的面包

Lv.1

b站小麦做的面包

获赞:320收藏:190浏览:14107作品收藏:184

签名:adofai做谱

回复帖子评论
上一页1 页 / 共 5下一页

【Python作品分享】斗罗大陆-星斗觉醒【作品秀】 中回复

196行多写了一个‘=’

gmcs == input("是否购买,1是,2否")

              ^

2021-07-23T11:08:36 点赞:0

【Python作品分享】斗罗大陆-星斗觉醒【作品秀】 中回复

emotion_编程猫_点赞

2021-07-23T11:09:06 点赞:0

怎么弄随机的整数??? 中回复

import random

print(random.randint(a,b))

#a,b是范围

2021-08-03T16:40:52 点赞:0

【Python作品分享】都不错 中回复

import turtle
t = turtle.Pen()
#t.speen(0)
#turtle.Screen().tracer(0)
color = ['red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple']
for i in range(0, 1000):
    for j in range(0,7):
        t.pencolor(color[j % 7])
        t.right(30)
        t.forward(i * 2)
t.hideturtle()
turtle.done()

2021-09-04T10:27:56 点赞:0

【Python作品分享】谁要来画画?1.0 中回复

import turtle
t = turtle.Pen()
while True:
    d = turtle.textinput('请输入方向', 'w:上,s:下,a:左,d:右,q:抬笔,e:落笔,c:清除,Cancel:停')
    if (d == 'w'):
        t.setheading(90)
        t.forward(100)
    elif (d == 's'):
        t.setheading((-90))
        t.forward(100)
    elif (d == 'a'):
        t.setheading(180)
        t.forward(100)
    elif (d == 'd'):
        t.setheading(0)
        t.forward(100)
    elif (d == 'q'):
        t.penup()
    elif (d == 'e'):
        t.pendown()
    elif (d == 'c'):
        t.clear()
    elif (d == None):
        turtle.done()

2021-09-04T10:56:49 点赞:1

【Python作品分享】谁要来画画?1.0【作品秀】 中回复

import turtle
t = turtle.Pen()
while True:
    d = turtle.textinput('请输入方向', 'w:上,s:下,a:左,d:右,q:抬笔,e:落笔,c:清除,Cancel:停')
    if (d == 'w'):
        t.setheading(90)
        t.forward(100)
    elif (d == 's'):
        t.setheading((-90))
        t.forward(100)
    elif (d == 'a'):
        t.setheading(180)
        t.forward(100)
    elif (d == 'd'):
        t.setheading(0)
        t.forward(100)
    elif (d == 'q'):
        t.penup()
    elif (d == 'e'):
        t.pendown()
    elif (d == 'c'):
        t.clear()
    elif (d == None):
        turtle.done()

2021-09-04T10:58:35 点赞:0

【Python作品分享】我的世界像素钻石【作品秀】 中回复

离谱

2021-09-04T12:59:18 点赞:0

【Python作品分享】积木凹槽【作品秀】 中回复

for i in range(0,10):
    print('Hello')

2021-09-08T20:56:04 点赞:0

【哈迷这里来】 中回复

我是麻瓜

2021-09-28T14:05:19 点赞:1

【Python作品分享】判断质数【求助帖】 中回复

def isPrime(n):

    # 第1部分:定义判断函数
    cnt = 0
    for i in range(n):
        if (n % (i + 1) == 0):
            cnt += 1
    if (cnt == 2):
        return True
    else:
        return False

def trying(i,t):
    if i>0:
        # 第2部分:定义排错函数
        try:
            print('第', t-i+1, '次输入')
            num = int(input())
            if isPrime(num):
                print('是质数')
            else:
                print('不是质数')
            print()
        except ValueError:
            print('不要乱输哦,请重新输入~')
            # 递归
            trying(i-1,t)

# 第3部分:输入判断次数 + 判断
print('输入判断次数:')
t = int(input())
print()
print('开始输入...')
trying(i,i)

# 第4部分:报告结束
print('运行结束!')

2021-10-04T12:44:51 点赞:0

【Python作品分享】判断质数【教程贴】 中回复

直接这样发到评论区就行了

2021-10-04T12:46:27 点赞:0

【Python作品分享】判断质数【教程贴】 中回复

点一下最后一个</>

2021-10-04T12:47:06 点赞:0

【Python作品分享】hello world!【作品秀】 中回复

class hhh:
    def __init__(self, the_String_Of_Hhh_Init_No_1,
                       the_String_Of_Hhh_Init_No_2,
                       the_String_Of_Hhh_Init_No_3,
                       the_String_Of_Hhh_Init_No_4,
                       the_String_Of_Hhh_Init_No_5,
                       the_String_Of_Hhh_Init_No_6,
                       the_String_Of_Hhh_Init_No_7,
                       the_String_Of_Hhh_Init_No_8,
                       the_String_Of_Hhh_Init_No_9,
                       the_String_Of_Hhh_Init_No_10,
                       the_String_Of_Hhh_Init_No_11,
                       the_String_Of_Hhh_Init_No_12):
        self.the_String_Of_Hhh_Init_No_1 = the_String_Of_Hhh_Init_No_1
        self.the_String_Of_Hhh_Init_No_2 = the_String_Of_Hhh_Init_No_2
        self.the_String_Of_Hhh_Init_No_3 = the_String_Of_Hhh_Init_No_3
        self.the_String_Of_Hhh_Init_No_4 = the_String_Of_Hhh_Init_No_4
        self.the_String_Of_Hhh_Init_No_5 = the_String_Of_Hhh_Init_No_5
        self.the_String_Of_Hhh_Init_No_6 = the_String_Of_Hhh_Init_No_6
        self.the_String_Of_Hhh_Init_No_7 = the_String_Of_Hhh_Init_No_7
        self.the_String_Of_Hhh_Init_No_8 = the_String_Of_Hhh_Init_No_8
        self.the_String_Of_Hhh_Init_No_9 = the_String_Of_Hhh_Init_No_9
        self.the_String_Of_Hhh_Init_No_10 = the_String_Of_Hhh_Init_No_10
        self.the_String_Of_Hhh_Init_No_11 = the_String_Of_Hhh_Init_No_11
        self.the_String_Of_Hhh_Init_No_12 = the_String_Of_Hhh_Init_No_12

    def ba_mei_ge_zi_fang_dao_yi_qi_zhe_shi_hhh_zhong_de_yi_ge_han_shu_jiao_qwq(self):
        return '{}{}{}{}{}{}{}{}{}{}{}{}'.format(self.the_String_Of_Hhh_Init_No_1,
                                     self.the_String_Of_Hhh_Init_No_2,
                                     self.the_String_Of_Hhh_Init_No_3,
                                     self.the_String_Of_Hhh_Init_No_4,
                                     self.the_String_Of_Hhh_Init_No_5,
                                     self.the_String_Of_Hhh_Init_No_6,
                                     self.the_String_Of_Hhh_Init_No_7,
                                     self.the_String_Of_Hhh_Init_No_8,
                                     self.the_String_Of_Hhh_Init_No_9,
                                     self.the_String_Of_Hhh_Init_No_10,
                                     self.the_String_Of_Hhh_Init_No_11,
                                     self.the_String_Of_Hhh_Init_No_12)

    def printf(zhe_ge_can_shu_shi_printf_zhong_de_yi_ge_can_shu_hui_da_yin_chu_zhe_ge_zai_printf_zhong_de_can_shu_ni_kan_kan_dui_bu_dui):
        print(zhe_ge_can_shu_shi_printf_zhong_de_yi_ge_can_shu_hui_da_yin_chu_zhe_ge_zai_printf_zhong_de_can_shu_ni_kan_kan_dui_bu_dui)
    lie_biao=['h','e','l','l','o',',','w','o','r','l','d','!']


zhe_shi_hhh_zhong_de_yi_ge_dui_xiang = hhh(hhh.lie_biao[0], 
                                           hhh.lie_biao[1],
                                           hhh.lie_biao[2],
                                           hhh.lie_biao[3],
                                           hhh.lie_biao[4],
                                           hhh.lie_biao[5],
                                           hhh.lie_biao[6],
                                           hhh.lie_biao[7],
                                           hhh.lie_biao[8],
                                           hhh.lie_biao[9],
                                           hhh.lie_biao[10],
                                           hhh.lie_biao[11],)
zhe_shi_yao_da_yin_chu_de_dong_xi = zhe_shi_hhh_zhong_de_yi_ge_dui_xiang.ba_mei_ge_zi_fang_dao_yi_qi_zhe_shi_hhh_zhong_de_yi_ge_han_shu_jiao_qwq()
hhh.printf(zhe_shi_yao_da_yin_chu_de_dong_xi)#多此亿举

2021-10-04T18:21:08 点赞:0

用一段话证明你是phigros老玩家(我先来 中回复

tips:你黄了,你蓝了,你白了,你没了

2021-10-07T19:00:11 点赞:0

用一段话证明你是phigros老玩家(我先来 中回复

丫口—————

2021-10-07T19:01:29 点赞:0

【Python作品分享】分形樱花树 中回复

代码都不带改的?

2021-10-10T16:42:19 点赞:0

【Python作品分享】闰年计算器【作品秀】 中回复

一定是图形化

2021-10-10T17:18:55 点赞:0

【Python作品分享】计算机【求助帖】 中回复

你的

__Pen

是干什么的???

你也没用它呀

2021-10-10T17:22:36 点赞:0

【Python作品分享】计算机【求助帖】 中回复

2=图画和3=画画的 elif 呢???

2021-10-10T17:29:10 点赞:0

【Python作品分享】计算机【求助帖】 中回复

import random

def tree(branchLen, t):
    if (branchLen > 3):
        if (8 <= branchLen and branchLen <= 12):
            if (random.randint(0, 2) == 0):
                t.pencolor('snow')
            else:
                t.pencolor('lightcoral')
            t.pensize((branchLen / 3))
        elif (branchLen < 8):
            if (random.randint(0, 1) == 0):
                t.pencolor('snow')
            else:
                t.pencolor('lightcoral')
            t.pensize((branchLen / 2))
        else:
            t.pencolor('sienna')
            t.pensize((branchLen / 10))
        t.forward(branchLen)
        a = (1.5 * (random.random()))
        t.right((20 * a))
        b = (1.5 * (random.random()))
        tree(branchLen - 10 * b, t)
        t.left((40 * a))
        tree(branchLen - 10 * b, t)
        t.right((20 * a))
        t.penup()
        t.backward(branchLen)
        t.pendown()

def petal(m, t):
    for i in range(m):
        a = (200 - 400 * (random.random()))
        b = (10 - 20 * (random.random()))
        t.penup()
        t.forward(b)
        t.left(90)
        t.forward(a)
        t.pendown()
        t.pencolor('lightcoral')
        t.circle(1)
        t.penup()
        t.backward(a)
        t.right(90)
        t.backward(b)

#电脑
print('欢迎来到计算机')
while True:
    user = input('有什么事吗 1:计算 2:游戏 3:图画 4:退出>>>')
    if user == '1':
        # 计算
        while True:
            print('好的,正在加载...')
            b = float(input('请输入第一个数 >>>'))
            c = float(input('请输入第二个数 >>>'))
            d = input('什么运算 1:加 2:减 3:乘 4:除 >>>')
            if d == '1':
                print(b + c)
            elif d == '2':
                print(b - c)
            elif d == '3':
                print(b * c)
            elif d == '4':
                print(b / c)
            else:
                print('请重新输入')
            h = input('还继续吗?1:继续 2:不了 >>>')
            if h == '2':
                break
    
    elif user == '2':
        # 猜数
        while True:
            print('好的,正在加载...')
            num = random.randint(1, 15)
            print('开始猜数,范围是1~15')
            while True:
                userNum = float(input('数是什么? '))
                if userNum > num:
                    print('大了')
                elif userNum < num:
                    print('小了')
                else:
                    print('对了')
                    break
            while True:
                yn = input('你还想玩吗?1:想 2:不了 >>>')
                if yn == '1' or yn == '2':
                    break
                else:
                    print('请重新输入')
            if yn == '2':
                break

    elif user == '3':
        # 图画
        import turtle
        t = turtle.Pen()
        t.speed(0)
        turtle.bgcolor('wheat')
        t.left(90)
        t.penup()
        t.backward(150)
        t.pendown()
        t.pencolor('sienna')
        tree(60, t)
        petal(100, t)
        turtle.done()
    elif user == '4':
        print('拜拜~~')
        break
    else:
        print('请重新输入')

改了大概一个小时qwq

2021-10-10T17:52:57 点赞:0

【Python作品分享】喵【作品秀】 中回复

 

2021-10-17T11:38:46 点赞:0

【Python作品分享】喵【作品秀】 中回复

while True:
    顶()

2021-10-17T11:39:32 点赞:0

【Python作品分享】大鱼吃小鱼【求助帖】 中回复

def setup(self):
Image.open("resource/sea.png").resize((SCREEN_WIDTH,SCREEN_HEIGHT)).save("resource/new_sea.png")
resource/sea.png 是不是没有啊

2021-10-17T11:45:33 点赞:0

【Python作品分享】喵【作品秀】 中回复

喵d

2021-10-17T11:46:05 点赞:0

【Python作品分享】喵【作品秀】 中回复

喵d

2021-10-17T12:28:08 点赞:0

【Python作品分享】喵【作品秀】 中回复

ddd

2021-10-17T13:05:08 点赞:0

【Python作品分享】喵【作品秀】 中回复

喵d

2021-10-17T15:44:18 点赞:0

【Python作品分享】喵【作品秀】 中回复

ddd

2021-10-18T18:51:23 点赞:0

【Python作品分享】喵【作品秀】 中回复

ddd

2021-10-22T19:27:42 点赞:0

【Python作品分享】喵【作品秀】 中回复

来个人吧

2021-10-30T07:56:49 点赞:0