python代码故障排除

2024-06-01 05:20:25 发布

您现在位置:Python中文网/ 问答频道 /正文

print ("whats your name?")
name = input()
print("hello",name,"Please state your phone devive, dsi or 3ds.")
brand = input()
if brand == ("3ds"):
    print ("Please state the problem, is it hardware or network related? ")
if brand == ("dsi"):
         print ("Please state the problem, is it hardware or network related? ")
broken = input()

    if broken == "hardware":
    print("please say the type of problem from this list: water damage, cracked screen, headphone/speaker or buttons or other.")
answer = input()
if answer == "water damage": #here i began to use a nested if statement 
    print("put the device in rice, until you are able to book an appointment with the nintendo store")
if answer == "cracked screen":
        print("go to the nintendo repair store as soon as possible.")
if answer == "headphone/speaker":
    print("check if there is anything in your headphone jack or speakers, if there is nothing there please book an appointment with the nintendo store")
if answer == "buttons":
    print("check that there is nothing in the buttons like food or grease, if clear go to the",brand,"store.")
if answer == "other":
    print ("please contact the nintendo store")




if broken == "network" and brand == "3ds" :
    print("Is your problem connecting to the wifi?")
answer0 = input()
if answer0 == "yes":
          print("check that airplane mode is not on, if thats not the problem you may have not been preivously connected to the wireless wifi")
else:
     print("is your problem with your meeting plaza")     
answer1 = input()    
if answer1 == "no":
    print("is your gam card faulty?")
else:
     print("Make sure iCloud is enabled. Launch the Settings app on your iPhone or iPad. 2.Tap on iCloud. 3.Tap on Backup. 5.Turn on iCloud Backup by moving the slider to the right. 6.You will be warned that your iPhone will no longer back up to your computer automatically. Tap on OK.")
answer2 = input()
if answer2 == "no":
    print("is your problem your update?")
else:
    print(" make sure your wifi is turned on. If problem still persists, try rebooting your phone by holding the off button and the home button at the same time, until apple logo appears")
answer3 = input()
if answer3 == "yes" :
    print ("did the problem occur after you updated your device?")   
else:
    print("please conact the nitendo store")
answer4 = input()
if answer4 == "yes":
    print("you may have incorrectly downloaded the software update, try rebooting your phone and if that doesnt work contact ") 
else:
    print("is your problem with the 3d affect?")
answer5 = input()
if answer5 == "yes":
    print ("Disable Siri (tap Settings->General>Siri), then turn your iPhone off and on and re-enable Siri again. If the above steps do not work, try reseting all settings on your iPhone. To do that tap, Settings > General > Reset > Reset all settings. Note that this will remove all settings and preferences.")
else:
    print ("please conact the nintendo store")



if broken == "network" and brand == "dsi" :
     print("Is your problem connecting to the wifi?")
answer12 = input()
if answer12 == "yes":
          print("check that airplane mode is not on, if thats no the problem you probably dont have any network in your area.")
else:
     print("is your problem with dsi?")     
answer13 = input()    
if answer13 == "no":
    print("is your problem with dsi  messages?")
else:
     print("You may have issues playing music if you lose your Internet connection or your connection speed changes. Check if you can load other web pages to test your connection")
answer14 = input()
if answer14 == "no":
    print("is your problem your update?")
else:
    print(" make sure your wifi is turned on. If problem still persists, try rebooting your phone by holding the off button and the home button at the same time, until apple logo appears")
answer15 = input()
if answer15 == "yes" :
    print ("did the problem occur after you updated your device?")

else:
    print("please conact 0800 031 4244 ")
answer16 = input()
if answer16 == "yes":
    print("you may have incorrectly downloaded the software update, try rebooting your phone and if that doesnt work contact 0800 031 4244 ") 
else:
    print("if your problem hasn't come up please contact your provider at 0800 048 0408")

我试图创建一个故障排除代码,但当涉及到运行dsi的代码时,它不会询问dsi的问题,而是针对3ds的问题,然后跳过dsi的第一个问题。我不知道怎么了。我想问题可能出在“和”的陈述上


Tags: orandthetoyouinputyourif