欢迎光临散文网 会员登陆 & 注册

我这个黑金版Edge,你们每个人都可以用

2023-02-27 22:45 作者:bili_60712174941  | 我要投稿

import dmath.logic as dml

s='((not p)|(not Q|R))'

dml.truthtable3(s)     

def truthtable3(s): 

  w='P O R'+s 

  print("%r"%w) 

truth={True,False} 

for P in truth: 

  for Q in truth: 

    for R in truth: 

      f=eval(s) 

      t=[P,O,R]+[f] 

      print01(t) 

     


我这个黑金版Edge,你们每个人都可以用的评论 (共 条)

分享到微博请遵守国家法律