CBSE Class 11 Computer Science Question 40 of 80

Getting Started with Python — Question 5

Back to all questions
5
Question

Question 5

Write a pseudocode that reads two numbers and divide one by another and display the quotient.

Answer
Step 1: INPUT num1
Step 2: INPUT num2
Step 3: IF num2 == 0 THEN
    Step 4: PRINT "Error: Division by zero is not allowed."
ELSE
    Step 5: COMPUTE quotient = num1 / num2
    Step 6: PRINT quotient