You are on page 1of 3

Problem Solving and Python Programming GE8151

Guess an integer number in a range

Algorithm

Step 1 Start Process


Step 2 Assign actual = 30
Step 3 Read guess from user
Step 4 If actual is equal to guess then goto Step 8
Step 5 Else compare guess and actual
Step 6 If guess > actual then print Enter Smaller Number and goto Step 3
Step 7 Else print Enter Greater Number and goto Step 3
Step 8 Print Number Found
Step 9 Stop Process

Rajasekaran S AP/IT
Problem Solving and Python Programming GE8151

Flow Chart
start

actual = 30

read guess

actual = guess
?
True False
False
actual < guess

True
Enter Smaller Enter Greater
Number Number

Number Found

stop

Rajasekaran S AP/IT
Problem Solving and Python Programming GE8151

Pseudo Code

START
SET actual = 30
READ guess
WHILE guess not equal to actual THEN
IF guess > actual
PRINT “Enter Smaller Number”
ELSE
PRINT “Enter Greater Number”
END IF
READ guess
END WHILE
PRINT “Number Found”
STOP

Rajasekaran S AP/IT

You might also like