CBSE Class 11 Computer Science Question 44 of 80

Getting Started with Python — Question 9

Back to all questions
9
Question

Question 9

Write an algorithm to find the greatest among two different numbers entered by the user.

Answer
Step 1: 

INPUT number1
INPUT number2

Step 2: 

IF number1 > number2 THEN
    PRINT "The greatest number is: " + number1
ELSE
    PRINT "The greatest number is: " + number2

Step 3: END