I Have a python code to fix phones and i was wondering what was the best way to jump to a particular question when i type in for example 'Broken Screen'
im really stuck and need this done i appreciate immensely all answers
def menu():
print("Welcome to Sams Phone Troubleshooting program")
print("Please Enter your name")
name=input()
print("Thanks for using Kierans Phone Troubleshooting program "+name)
print("Would you like to start this program? Please enter either y for yes or n for no")
select=input()
if select=="y":
troubleshooter()
elif select=="n":
quit
else:
print("Invalid please enter again")
menu()
def troubleshooter():
print("Does Your Phone Turn On")
answer=input()
if answer=="y":
print("Does it freeze?")
else:
print("Have you plugged in a charger?")
answer=input()
if answer=="y":
print("Charge it with a diffrent charger in a diffrent phone socket")
else:
print("Plug it in and leave it for 20 mins, has it come on?")
answer=input()
if answer=="y":
print("Is there any more problems?")
else:
print("Is the screen cracked?")
answer=input()
if answer=="y":
print("Restart this program")
else:
print("Thank you for using my troubleshooting program!")
answer=input()
if answer=="y":
print("Replace screen in a shop")
else:
print("Take it to a specialist")
answer=input()
if answer=="y":
print("Did you drop your device in water?")
else:
print("Make sure the sim card is inserted properly and do a hard reset on the device")
answer=input()
if answer=="y":
print("Do not charge it and take it to the nearest specialist")
else:
print("Try a hard reset when the battery has charge")
answer=input()
menu()
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…