猫史档案馆


【Python作品分享】世记-World Records

用户:木兮MUIT木兮MUIT查看:0 回复:1 评论:0 创建时间:2021-02-11T18:36:30


【作品展示】

center_image

 

【作品介绍】

新年临近,HR团队推出新春版世记!

-记录栏新增‘新年快乐’字样

-修改已知bug

-新增‘彩蛋’:新年快乐

-各功能新增新年元素

-增加了n个bug

 

【作品源代码】

import time
a=time.ctime()
print('世记')
print('World Records')
time.sleep(3)
print('—————————————————Version 3.2——————————————————')
print('新年快乐!')
print('使用前请阅读《使用注意事项》')
print('Happy Chinese New Year!')
print('Read "Use precautions" before use')
print('——————————————————————————————————————————————')
a = ['新年快乐','happy new year']
while True:
    guo_jia = input('Choose language/选择语言:')
    if guo_jia in 'Chinese' '中文' 'chinese':
        while True:
            shu_ru = input('输入“阅读”即可阅读《使用注意事项》:')
            if shu_ru in '阅读' '阅读使用注意事项':
                print('—————————————————————————————————————————————')
                print('HR-世记')
                print('—————————————————————————————————————————————')
                print('*使用注意事项*')
                print('目前可用模式:事记')
                print('(默认模式)事记可记录与删除')
                print('如需更改模式请输入‘更改’')
                print('输入‘退出’即可退出')
                print('退出后数据将丢失')
                print('—————————————————————————————————————————————')
                print('*《免责说明》*')
                print('')
                print('—————————————————————————————————————————————')
                shu_ru2 = input('我已认真阅读注意事项,同意《免责说明》:(同意/取消)')
                if shu_ru2 in '同意':
                    while True:
                        shu_ru1 = input('记录/删除/查看:')
                        if shu_ru1 in '记录':
                             while True:
                                b = input('记录内容:')
                                if b in '更改':
                                    break
                                elif b in '新年快乐':
                                    print('新年快乐!')
                                    a.insert(0, [b])
                                    print('记录:', a, sep='')
                                else:
                                    a.insert(0, [b])
                                    print('记录:', a, sep='')
                        elif shu_ru1 in '删除':
                            while True:
                                b = input('删除内容:')
                                if b in '更改':
                                    break
                                elif [b] in a:
                                    a.remove([b])
                                    print('记录:', a, sep='')
                                elif b in '新年快乐''happy new year':
                                    print('你无法删除系统字符!')
                                    print('祝你新年快乐')
                                else:
                                    print('无法删除!该内容不在记录事项中!')
                        elif shu_ru1 in '查看':
                            print('记录:', a, sep='')
                        elif shu_ru1 in '新年快乐':
                            print('好的,这是一个彩蛋')
                            print('祝你新年快乐!')
                        elif shu_ru1 in '现在时间' '时间' '现在' 'today' 'Today':
                            print('好的,这是一个彩蛋')
                            print('正在获取当前时间')
                            time.sleep(2)
                            print('现在是',a)
                        elif shu_ru1 in 'stop' '退出' '返回':
                            print('-返回-')
                            break
                        elif shu_ru1 in '更改':
                            print('请先选择模式!')
                        else:
                            print('无此功能!')
                            print('更多功能开发中,敬请期待')
                else:
                    print('你必须阅读它!')
                    break
            elif shu_ru in '退出':
                break
            else:
                print('请先阅读使用注意事项!')
    elif guo_jia in 'English' '英语' '英文' 'english':
        while True:
            shu_ru = input(
                'Enter "read" to read *precautions for use*:')
            if shu_ru in 'read':
                print('—————————————————————————————————————————————')
                print('HR-World Records')
                print('—————————————————————————————————————————————')
                print('* precautions for use *')
                print('Currently available mode: Notes')
                print('(default mode) notes can be recorded and deleted')
                print('Enter"change"if you want to change the mode')
                print('Enter"exit"to exit')
                print('Data will be lost after exit')
                print('—————————————————————————————————————————————')
                print('*Disclaimer Notes*')
                print('')
                print('—————————————————————————————————————————————')
                shu_ru2 = input(
                    'I have read the notes carefully and agree to the Disclaimer Notes: (agree/cancel)')
                if shu_ru2 in 'agree':
                    while True:
                        shu_ru1 = input('record/delet/see: ')
                        if shu_ru1 in 'record':
                            while True:
                                b = input('Record Content:')
                                if b in 'change':
                                    break
                                elif b in 'happy new year':
                                    print('Happy Chinese New Year!')
                                    a.insert(0, [b])
                                    print('record:', a, sep='')
                                else:
                                    a.insert(0, [b])
                                    print('record:', a, sep='')
                        elif shu_ru1 in 'delet':
                            while True:
                                b = input('Delet Content:')
                                if b in 'change':
                                    break
                                elif [b] in a:
                                    a.remove([b])
                                    print('record:', a, sep='')
                                elif b in 'happy new year''新年快乐':
                                    print(
                                        'You cannot delete system characters!                                           ')
                                    print('Happy New Year!')
                                else:
                                    print(
                                        "Can't delete!This is not on the record!")
                        elif shu_ru1 in 'see':
                            print('record:', a, sep='')
                        elif shu_ru1 in 'happy new year':
                            print('Okay, this is a hidden content')
                            print('Happy New Year!')
                        elif shu_ru1 in 'Now' 'time' 'Time' 'now' 'today' 'Today':
                            print('Okay, this is a hidden content')
                            print('Getting the current time')
                            time.sleep(2)
                            print('Now is', time.ctime())
                        elif shu_ru1 in 'stop' 'exit':
                            print('Exited!')
                            break
                        elif shu_ru1 in 'change':
                            print(
                                'Please select the mode first!')
                        else:
                            print('No such function!')
                            print('Looking forward to more feature development!')
                else:
                    print('You must read it!')
                    break
            elif shu_ru in 'exit':
                break
            else:
                print('Please read the usage precautions first!')
    else:
        print('This language is not supported at the moment')

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 1下一页
BZIClawLYNEYBZIClawLYNEY

这段代码有问题

点赞0


评论