猫史档案馆


【Python作品分享】python

用户:子钦一下子钦一下查看:0 回复:0 评论:0 创建时间:2021-12-25T09:28:41


【作品展示】

center_image

 

【作品介绍】

python

 

【作品源代码】

import easygui


print('Python 3.9.9 (tags/v3.9.9:ccb0e6a, Nov 15 2021, 18:08:50) [MSC v.1929 64 bit (AMD64)] on win32')
print('Type "help", "copyright", "credits" or "license" for more information.')
ss = 1
while True:
    x = input('>>> ')
    if (x == '=='):
        if (int(input('第1个数?')) == int(input('第2个数?'))):
            print(True)
        else:
            print(False)
    if (x == '>'):
        if (int(input('第1个数?')) > int(input('第2个数?'))):
            print(True)
        else:
            print(False)
    if (x == '<'):
        if (int(input('第1个数?')) < int(input('第2个数?'))):
            print(True)
        else:
            print(False)
    if (x == '!='):
        if (int(input('第1个数?')) != int(input('第2个数?'))):
            print(True)
        else:
            print(False)
    if (x == 'print'):
        print(input())
        if (x == '='):
            ss = input()
            print(ss)
    if (x == '='):
        ss = input()
    if (x == 'ss'):
        print(ss)
    if (x == 'easygui'):
        print('注意:内容为设置的ss变量')
        easygui.msgbox(ss)
    if (x == '[]'):
        print('注意:内容为设置的ss变量')
        print([ss])
    if (x == '{}'):
        print('注意:内容为设置的ss变量')
        print({'输出': ss})
    if (x == 'True'):
        print(True)
    if (x == 'False'):
        print(False)

 

【提示】

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

https://python.codemao.cn


回复

上一页1 页 / 共 0下一页