【发布时间】:2015-11-18 22:02:46
【问题描述】:
我无法将这段代码转换为流程图。如果你能给我提示,甚至为我做,那就太好了(当然有解释)
list = ['Yes','yes','YES','y','Y','NO','No','no','n','N']
list1 = ['Yes','yes','YES','y','Y']
list2 = ['NO','No','no','n','N']
class TS:
def DM4(self):
a = input('Do you have problems with your memory managment?')
if a not in list:
objTS = TS()
objTS.DM4()
elif a in list1:
f = open('dm4.txt', 'r')
print(f.read())
elif a in list2:
objTS = TS()
objTS.Menu()
def Menu(self):
userMenuOpt = input("""******************************************
Welcome to the trobule shooter
Choose a category from the option below:
Hardware
Device Managment
Media & Internet
Not Sure
******************************************`
""")
if userMenuOpt in ["Device Management","DM","devicemanagment","dm","DEVICE MANAGEMENT"]:
objTS = TS()
objTS.DM4()
【问题讨论】:
-
我投票结束这个问题,因为 Stack Overflow 不是代码编写服务