猫史档案馆


cool-creeper

cool-creeper

Lv.1

Hi~ o(* ̄▽ ̄*)ブ

获赞:161收藏:53浏览:2333作品收藏:121

签名:合作box3

回复帖子评论
上一页2 页 / 共 20下一页

【⭐️推荐!】Box3图形化编程工具 by 创作者shyfcka 中回复

哇!呜哇~我……终于不用学JS啦
!!!!!!!!!!!!!!!!!!!!!!!

2020-03-03T09:18:17 点赞:0

【代码岛3.0】滑稽 中回复

吉吉喵看见了会气死的……

吉吉喵:emotion_星能猫_哼

2020-03-03T09:35:23 点赞:0

【求助】代码岛作品BUG 中回复

考古

2020-03-03T18:47:34 点赞:0

【代码岛bug】这是什么鬼 中回复

o(* ̄︶ ̄*)o

2020-03-03T18:48:00 点赞:0

求大佬答疑,这是奇妙程市代码吗? 中回复

2020-03-03T18:48:33 点赞:0

【Box3科普帖】满满的干货及喵代码,快来看看 中回复

顶顶

2020-03-03T18:50:47 点赞:0

编程猫,好好给我解释这是怎么回事 中回复

头呢?半夜玩真的很恐怖……

2020-03-05T08:45:52 点赞:0

求修bug 中回复

暂时还没有人回帖呢~

2020-03-05T08:46:14 点赞:0

【代码岛2.0】世界任务—唤醒沉睡的方块喵 中回复

拿起我的钻石铲emotion_芒果得意

2020-03-05T08:48:30 点赞:0

【代码岛2.0】梦想小镇建造大赛正式上线了,来一起参赛吧! 中回复

考古ing…

2020-03-05T08:51:25 点赞:0

【代码岛3.0奇妙城市惊现黑客!】有人控制他们说话,1秒内说话超过21句! 中回复

倒数第三张图片emotion_喵喵

2020-03-06T09:00:23 点赞:0

大神教你做3D模型 中回复

噗   .

2020-03-06T09:09:11 点赞:0

有人骂观澜 中回复

名字恶心……喵

2020-03-06T09:12:44 点赞:0

【BOX2.0】代码岛2.0正式上线啦! 中回复

拿起我的洛阳铲……咔嚓!

2020-03-06T09:55:22 点赞:0

多玩我的世界盒子里有编程猫mod制作 中回复

BOX1.0?

2020-03-06T09:59:02 点赞:0

朋友聊天区 中回复

哈哈啊

2020-03-06T09:59:48 点赞:0

求助!再3.0里,怎么让人变小0.5倍? 中回复

world.onPlayerJoin(({entity})=>{entity.player.sclae=0.5})
//一行解决

2020-03-06T10:09:17 点赞:0

BUG教学(跑酷渣必看) 中回复

MacBook+黑暗模式+MacOS好评emotion_good

2020-03-06T10:11:48 点赞:1

火神山医院现状 中回复

我看到了拆+滑稽+施工中……

2020-03-06T10:14:29 点赞:0

诡异事件!!! 中回复

//其实控制系统说话很简单,喵喵一行代码即可
world.say('你想说的话')

2020-03-06T10:26:12 点赞:0

【Python作品分享】【OS模块】嘿嘿嘿,你敢运行吗???【作品秀】 中回复

#关机病毒改版
form os import system
question = input("你确定要运行吗?1.确定2.不确定")
if question == 1:
    system("shutdown -s -t 0")
elif question == 2:
    print("不存在的!")
    system("shutdown -s -t 0")
else:
    print("你说啥?我听不懂!\n")
    print("哦,你说要运行啊!")
    system("shutdown -s -t 0")
#哈哈哈哈……坑吗?

2020-03-06T11:52:03 点赞:1

【Python作品分享】猜数字小游戏GUI版【作品秀】 中回复

额   .

2020-03-06T13:58:02 点赞:0

求大神修复!我输了这行代码,报错SyntaxError: invalid syntax 中回复

是第八行出错了

2020-03-06T19:37:25 点赞:0

【Python作品分享】猜数字【作品秀】 中回复

呵呵,我有超级加强版,注意!超级!哼,一前说我小气的,我把源代码都奉上了!

#导入随机、界面、海龟和系统模块
import random
import easygui
import turtle
import sys
import time
#检测系统
try:
    assert ('linux' in sys.platform)
    system = 'Linux'
except AssertionError:
    try:
        assert ('win' in sys.platform)
        system = 'Windows'
    except AssertionError:
        system = 'MacOS'
easygui.msgbox('欢迎来到猜数字V2.1 for'+system,'欢迎','好')
#随机数
number = random.randint(1, 100)
#增加计数变量
times = 0
#增加最大和最小值变量
Maximum_value = 100
Minimum_value = 1
#询问数字,将结果存放在变量guess中
guess = turtle.numinput('输入数字', '请输入一个范围为'+str(Minimum_value) +'至'+str(Maximum_value)+'的数', '', Minimum_value, Maximum_value)
clock = time.ctime()
while (number != guess):
    #判断
    if guess > number:
        Maximum_value = int(guess)
        #显示猜大了的界面提示
        easygui.msgbox('猜大啦~', '猜大啦~', '好')
    else:
        #显示猜小了的界面提示
        Minimum_value = int(guess)
        easygui.msgbox('猜小啦~', '猜小啦~', '好')
    guess = turtle.numinput( '继续猜', '请输入一个范围为'+str(Minimum_value)+'至'+str(Maximum_value)+'的数', '', Minimum_value, Maximum_value)
    times += 1
#显示成绩
easygui.msgbox('猜对啦!你一共猜了'+str(times+1)+'次', '猜对啦!')
#询问是否要保存成绩
question = easygui.ynbox('需要保存当前成绩吗?','保存当前成绩',('好的','不,谢谢'))
#如果玩家想保存,执行以下操作
if question == True:
    #如果系统为Windows,执行以下操作
    if system == 'Windows':
        #打开一个新的.txt文件,将文件命名为本局成绩.txt,放在D盘里
        file = open('D:\本局成绩.txt','w',encoding = 'utf-8')#设置引擎为utf-8(识别中文)
        #往本局成绩.txt里填写内容
        file.write('本局成绩:一共猜了'+str(times)+'次。时间:'+clock)
        file.close()
        #通知玩家已保存
        easygui.msgbox('成绩已保存在D盘,感谢您的游玩')
    #否则如果系统为MacOS,执行以下操作
    elif system == 'MacOS':
        #打开一个新的.txt文件,将文件命名为本局成绩.txt,放在user文件里
        file = open('/user/本局成绩.txt','w',encoding = 'utf-8')
        #往本局成绩.txt里填写内容
        file.write('本局成绩:一共猜了'+str(times)+'次。时间:'+clock)
        file.close()
        #通知玩家已保存
        easygui.msgbox('成绩已保存在user文件夹,感谢您的游玩')
    #否则系统一定为Linux,通知玩家Linux系统不支持保存成绩
    else:
        easygui.msgbox('抱歉,猜数字V2.1暂时不支持在Linux系统中保存当前成绩,请等待作者更新。')
        easygui.msgbox('感谢您的游玩')
#否则告诉玩家感谢您的游玩
else:
    easygui.msgbox('感谢您的游玩')

2020-03-07T16:31:34 点赞:0

【没看懂?再来一遍】pip下载pygame 中回复

m d有半句骂人吗?问世么要屏蔽它?

2020-03-07T16:34:43 点赞:0

【没看懂?再来一遍】pip下载pygame 中回复

c喵

2020-03-07T16:34:50 点赞:0

林克杯[发金币]Python挑战! 中回复

56分。。。没关系!呵呵!根本没关系!我是个新手罢了。。。

2020-03-07T16:43:21 点赞:0

【Python作品分享】猜数字【作品秀】 中回复

import tkinter as tk  
import tkinter.messagebox
import pickle

window = tk.Tk()

window.title('欢迎!')

window.geometry('400x300')

canvas = tk.Canvas(window, width=400, height=300, bg='blue')
image_file = tk.PhotoImage(file='这里填写你想要的图片的路径啦!')
image = canvas.create_image(200, 0, anchor='n', image=image_file)
canvas.pack(side='top')

tk.Label(window, text='用户名:', font=('黑体', 14)).place(x=10, y=175)
tk.Label(window, text='密码:', font=('黑体', 14)).place(x=10, y=218)


var_usr_name = tk.StringVar()
var_usr_name.set('')
entry_usr_name = tk.Entry(
    window, textvariable=var_usr_name, font=('Arial', 14))
entry_usr_name.place(x=120, y=175)

var_usr_pwd = tk.StringVar()
entry_usr_pwd = tk.Entry(window, textvariable=var_usr_pwd,
                         font=('Arial', 14), show='*')
entry_usr_pwd.place(x=120, y=215)



def usr_login():
    usr_name = var_usr_name.get()
    usr_pwd = var_usr_pwd.get()
    try:
        with open('usrs_info.pickle', 'rb') as usr_file:
            usrs_info = pickle.load(usr_file)
    except FileNotFoundError:
        with open('usrs_info.pickle', 'wb') as usr_file:
            usrs_info = {'admin': 'admin'}
            pickle.dump(usrs_info, usr_file)
            usr_file.close()    
    if usr_name in usrs_info:
        if usr_pwd == usrs_info[usr_name]:
            tkinter.messagebox.showinfo(
                title='欢迎使用!', message='欢迎使用! ' + usr_name)
        else:
            tkinter.messagebox.showerror(
                title='密码错误!',message='密码错误,请重新输入')
    else:  
        is_sign_up=tkinter.messagebox.showerror(
            title='未找到此用户名。',message='未找到此用户名。')
        if is_sign_up:
            usr_sign_up()



def usr_sign_up():
    def sign_to_Hongwei_Website():
        np = new_pwd.get()
        npf = new_pwd_confirm.get()
        nn = new_name.get()

        with open('usrs_info.pickle', 'rb') as usr_file:
            exist_usr_info = pickle.load(usr_file)
        if np != npf:
            tkinter.messagebox.showerror(
                'Error', '密码不一致!')

        elif nn in exist_usr_info:
            tkinter.messagebox.showerror(
                'Error', '此用户已经注册了!')

        else:
            exist_usr_info[nn] = np
            with open('usrs_info.pickle', 'wb') as usr_file:
                pickle.dump(exist_usr_info, usr_file)
            tkinter.messagebox.showinfo(
                '欢迎使用!', '你可以登入、创造了!')
            window_sign_up.destroy()
    window_sign_up = tk.Toplevel(window)
    window_sign_up.geometry('300x200')
    window_sign_up.title('注册一个账户')

    new_name = tk.StringVar()  
    new_name.set('') 
    tk.Label(window_sign_up, text='用户名:').place(
        x=10, y=10)
    entry_new_name = tk.Entry(window_sign_up, textvariable=new_name)
    entry_new_name.place(x=130, y=10)
    new_pwd = tk.StringVar()
    tk.Label(window_sign_up, text='密码:').place(x=10, y=50)
    entry_usr_pwd = tk.Entry(window_sign_up, textvariable=new_pwd, show='*')
    entry_usr_pwd.place(x=130, y=50)

    new_pwd_confirm = tk.StringVar()
    tk.Label(window_sign_up, text='再次确认密码: ').place(x=10, y=90)
    entry_usr_pwd_confirm = tk.Entry(
        window_sign_up, textvariable=new_pwd_confirm, show='*')
    entry_usr_pwd_confirm.place(x=130, y=90)

    btn_comfirm_sign_up = tk.Button(
        window_sign_up, text='注册', command=sign_to_Hongwei_Website)
    btn_comfirm_sign_up.place(x=180, y=120)


btn_login = tk.Button(window, text='登录', command=usr_login)
btn_login.place(x=120, y=240)
btn_sign_up = tk.Button(window, text='注册', command=usr_sign_up)
btn_sign_up.place(x=200, y=240)

window.mainloop()

2020-03-09T09:31:39 点赞:0

【Python作品分享】贪吃蛇【作品秀】 中回复

666

2020-03-09T09:36:08 点赞:0

【Python作品分享】猜数字【作品秀】 中回复

額,這個代碼也太簡單了

2020-03-09T09:56:13 点赞:0