追梦少年啊
发表于 2023-4-2 10:59:31
币
Jay_
发表于 2023-4-2 11:45:28
HELP
Jay_
发表于 2023-4-2 11:46:08
测试
歌者文明清理员
发表于 2023-4-2 12:01:27
鱼币
赫尔曼·迈耶-
发表于 2023-4-2 13:46:12
币
long90
发表于 2023-4-2 14:50:43
help
sxxa
发表于 2023-4-2 16:58:23
Boolean Python0.5交互界面
kerln888
发表于 2023-4-2 19:15:08
{:10_256:}{:10_256:}{:10_256:}
a905448839
发表于 2023-4-2 22:06:20
看看!
陶远航
发表于 2023-4-5 10:04:58
鱼币
芜湖666
发表于 2023-4-5 13:18:08
还行
大baba
发表于 2023-4-5 17:05:14
66
lxydaw
发表于 2023-4-5 18:33:19
{:10_257:}
歌者文明清理员
发表于 2023-4-6 19:54:29
币
歌者文明清理员
发表于 2023-4-10 22:55:03
error = 0
class All:
def AND(x1, x2):
return int(x1 and x2)
def OR(x1, x2):
return int(x1 or x2)
def NOT(x1):
return int(not x1)
def evalnum(dm):
global error
if dm == "HELP":
return '''Welcome to Boolean Python 0.5, Boolean Python was developed by an idiot in 2023.
The Boolean Python is a pretty useless binary calculator that helps you compute operations between binaries.
But these features are already available in Python, so you could have done without installing Boolean Python, as it's too useless.
How to use:
1.AND
AND[ x1 x2 ]
The "AND[ x1 x2 ]" returns x1 and x2.For example, "AND[ 1 0 ]" returns 0.
2.OR
OR[ x1 x2 ]
The "OR[ x1 x2 ]" returns x1 or x2.For example, "OR[ 0 1 ]" returns 1.
3.NOT
NOT[ x1 ]
The "NOT[ x1 ]" returns not x1.For example, "NOT[ 1 ]" returns 0.'''
else:
return eval(dm.lower().replace('[', '(')
def run(dm):
if dm.isspace() or dm == "":
print("SyntaxError: space input")
else:
try:
x = dm.split(" ")
print_yesno = False
num = evalnum(x)
print(num, end="")
except Exception as e:
if error == "[]":
print("SyntaxError: There's no ] corresponding to the [")
elif error == "][":
print("SyntaxError: There's no [ corresponding to the ]")
elif error == "???":
print("NameError: here's not BIF")
def main():
while True:
x = input("> ")
run(x)
main()
给你省下一大截!
芜湖666
发表于 2023-4-11 13:24:18
这真不是个东西啊
sfqxx
发表于 2023-4-12 19:09:57
{:10_265:}
sfqxx
发表于 2023-4-22 11:23:56
/
isdkz
发表于 2023-4-22 12:00:10
{:5_106:}
yinda_peng
发表于 2023-4-23 15:57:51
10%