Arithmetic operators · 11 / 18 Exercise Easy

Division by zero

Objective

Develop a Python program that prompts the user for two numbers (x and y) and displays the result of the division operation.

The program should include a check to prevent division by zero using an if statement. If the user attempts to divide by zero, a message will be displayed indicating Division by zero is not possible.

Instructions

  1. Solicit two numbers from the user (x, y).
  2. Perform the division operation of x by y.
  3. Include a check to avoid division by zero using an if statement.
  4. If the user attempts to divide by zero, display the message "Division by zero is not possible."
Input
6
0
Output
Division by zero is not possible

Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.

Start exercise