-1

I'm currently studying JavaScript in Computer Science and just need a little help on my pseudocode as I'm getting confused. The task is to create a phone troubleshooting system in python. I have finished my basic flow chart for Task 1 but I'm now struggling to write it in pseudocode due to the excessive amount of questions. Can anyone guide me in the right direction?

Flow Chart: click here

My started Pseudocode:

START
OUTPUT ‘screen question1 here’
INPUT ‘user answer’
IF answer1 = ‘yes’ THEN
    OUTPUT ‘screen question2 here’
    INPUT ‘user answer’
ELSE
    OUTPUT ‘battery question1 here’
    INPUT ‘user answer’
IF answer2 = ‘yes’ THEN
    OUTPUT ‘screen question3 here’
ELSE

Thanks.

Zac
  • 23
  • 1
  • 6
  • 1
    You certainly could use a nested if structure like this. You might want to think about organizing data in a way that lets the computer do most of the work for you though. – kevswanberg May 01 '17 at 16:10
  • I'm confused - you say you're learning JavaScript in the question, tag this with Python, and ask about pseudocode. How is this question related in any way to either JavaScript or Python? – EJoshuaS - Stand with Ukraine May 01 '17 at 16:53

1 Answers1

0
answeer=''
answer2=''
answer3=' '

print ('screen question1 here')
answer = input ('user answer')
if answer=='yes':
    print ('screen question2 here')
    answer2 = input('user answer') 
else:
    print ('battery question1 here')
    answer3 = input('user answer')

if answer2 == 'yes':
    print ('screen question3 here')
else:
    pass

This is just an idea, the rest it's up to you.

See this code working here.

Sidon
  • 1,316
  • 2
  • 11
  • 26