mercredi 1 juin 2016

Troubleshooting phone program [duplicate]

This question already has an answer here:

My code doesn't work properly as all the webbrowser will still occur whether or not I input the "brand"

print("------------------------------------------------------------------")
device= (raw_input("What device do you have- "))
print("------------------------------------------------------------------")
brand = (raw_input("What brand is your device- "))
print("------------------------------------------------------------------")
version = (raw_input("What is the version of your device- "))
print("------------------------------------------------------------------")
info = raw_input("Do you have this phone: "+brand +" "+ device +" "+ version +": -")
print("------------------------------------------------------------------")
prob = raw_input("What's the problem with your: "+brand +" "+ device +" "+ version +": -")
print("------------------------------------------------------------------")
if prob == "water" or "wet" or "spilled" or "poured" or "fell in":
    print("This might help you with you with your")
    print("            phone's water problem")
    print("------------------------------------------------------------------")
    print("                   Please wait...")
    print("------------------------------------------------------------------")
if brand == "Apple" or "apple"or "APPLE":
webbrowser.open(wateriphone)
if brand == "Samsung" or "samsung" or "SAMSUNG":
webbrowser.open(watersamsung)
if brand == "htc" or "HTC" or "Htc":
webbrowser.open(waterhtc)

Aucun commentaire:

Enregistrer un commentaire