Link to home
Start Free TrialLog in
Avatar of clement lee
clement lee

asked on

python

I need to set up the question ask user what type of the device they use and ask them question them print out the solution!
e.g. : computer: What type of OS you use?
          users: IOS
          computer: is your screen working?
          users:.........
Then I write that program but it don't work, can someone help please?
s1 = ('if you drop it into the water then try to put it into the rice, if not please replace the screen! ')
s2 = ('please go to the local shop to check your phone!')
s3 = ('please repleace the button!')
s4 = ('please turn on the power!')
s5 = ('Please try with different charge')
s6 = ('please charge your phone fully')
s7 = ('please replace your batter')
s8 = ('please delete some app for your phone to install a new app')
s9 = ('please turn up the volume')
s10 = ('please replease the speaker frome your phone!')
s11 = ('That good! If you have other any problem please go to our shop and check with the staff')
def android():
problem1=None
while problem1 not in ('yes', 'no'):
     problem1=input("Is your screen working?")

if problem1=='no':
    problem2=None
    while problem2 not in ('yes', 'no'):
        problem2=input('have you drop your phone or have you drop it into the water?')

    if problem2=='yes':
        print(s1)
    elif problem2=='no':
        print(s2)

elif problem1=='yes':
    problem3=None
    while problem3 not in ('yes', 'no'):
        problem3=input('is the button working?')

    if problem3=='no':
        print(s3)
    elif problem3=='yes':
        problem4=None
        while problem4 not in ('yes','no'):
            problem4=input('when you charge your phone have the screen show anything or have the light at the top appear?')

        if problem4=='no':
            problem5=None
            while problem5 not in('yes','no'):
                problem5=input('is the power on')

            if problem5=='yes':
                print(s5)
            elif problem5=='no':
                print(s4)

        elif problem4=='yes':
            problem6=None
            while problem6 not in('yes','no'):
                problem6=input('is your phone fully charge')

            if problem6=='no':
                print(s6)
            elif problem6=='yes':
                problem7=None
                while problem7 not in('yes','no'):
                    problem7=input('can you turn on your phone?')

                if problem7=='no':
                    print(s7)
                elif problem7=='yes':
                    problem8=None
                    while problem8 not in('yes','no'):
                        problem8=input('can you install any new app')

                    if problem8=='no':
                        print(s8)
                    elif problem8=='yes':
                        problem9=None
                        while problem9 not in('yes','no'):
                            problem9=input('is the sound working?')

                        if problem9=='no':
                            problem10=None
                            while problem10 not in('yes','no'):
                                problem10=input('have you turn the nolume up?')
                            if problem10=='no':
                                print(s9)
                            elif problem10=='yes':
                                print(s10)
                                greeting = print("what Operating System you have?Anroid or IOS?")
                                if greeting=='Android':
                                    print(android)
def IOS():
    problem1 = None
while problem1 not in ('yes', 'no'):
    problem1=input("Is your screen working?")

if problem1=='no':
    problem2=None
    while problem2 not in ('yes', 'no'):
        problem2=input('have you drop your phone or have you drop it into the water?')

    if problem2=='yes':
        print(s1)
    elif problem2=='no':
        print(s2)

elif problem1=='yes':
    problem3=None
    while problem3 not in ('yes', 'no'):
        problem3=input('is the button working?')

    if problem3=='no':
        print(s3)
    elif problem3=='yes':
        problem4=None
        while problem4 not in ('yes','no'):
            problem4=input('when you charge your phone have the screen show anything or have the light at the top appear?')

        if problem4=='no':
            problem5=None
            while problem5 not in('yes','no'):
                problem5=input('is the power on')

            if problem5=='yes':
                print(s5)
            elif problem5=='no':
                print(s4)

        elif problem4=='yes':
            problem6=None
            while problem6 not in('yes','no'):
                problem6=input('is your phone fully charge')

            if problem6=='no':
                print(s6)
            elif problem6=='yes':
                problem7=None
                while problem7 not in('yes','no'):
                    problem7=input('can you turn on your phone?')

                if problem7=='no':
                    print(s7)
                elif problem7=='yes':
                    problem8=None
                    while problem8 not in('yes','no'):
                        problem8=input('can you install any new app')

                    if problem8=='no':
                        print(s8)
                    elif problem8=='yes':
                        problem9=None
                        while problem9 not in('yes','no'):
                            problem9=input('is the sound working?')

                        if problem9=='no':
                            problem10=None
                            while problem10 not in('yes','no'):
                                problem10=input('have you turn the nolume up?')
                            if problem10=='no':
                                print(s9)
                            elif problem10=='yes':
                                print(s10)
                                greeting = print("what Operating System you have?Anroid or IOS?")
if greeting=='Android':
     print(android)
elif greeting=='IOS':
          print(IOS)
else:
               print("...")

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Shalom Carmel
Shalom Carmel
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial