QUESTION IMAGE
Question
part d: flow chart
- draw the flowchart with proper shapes:
- ovals → start/end
- parallelogram → input/output
- diamond → decision
- rectangle → process
begin
secretnumber - random(1, 10)
repeat
display \enter your guess (1-10): \
input guess
if guess = secretnumber then
display \correct! you win!\
else if guess > secretnumber then
display \too high, try again.\
else
display \too low, try again.\
endif
until guess = secretnumber
end
Step1: Start
Draw an oval and label it "Start".
Step2: Generate secret number
Draw a rectangle labeled "secretNumber = RANDOM(1, 10)".
Step3: Input prompt
Draw a parallelogram labeled "Display 'Enter your guess (1 - 10):'".
Step4: Input guess
Draw a parallelogram labeled "Input guess".
Step5: Decision - check guess
Draw a diamond labeled "guess = secretNumber?".
Step6: Correct guess path
From the "yes" side of the diamond, draw a rectangle labeled "Display 'Correct! You win!'", then an oval labeled "End".
Step7: Incorrect - too high path
From the "no" side of the diamond, draw another diamond labeled "guess > secretNumber?". From the "yes" side of this new diamond, draw a rectangle labeled "Display 'Too high, try again.'", then connect back to the input - prompt parallelogram.
Step8: Incorrect - too low path
From the "no" side of the second diamond, draw a rectangle labeled "Display 'Too low, try again.'", then connect back to the input - prompt parallelogram.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
The flowchart is drawn as described above with appropriate shapes for start/end, input/output, decision, and process steps.