Zerodivisionerror error in Python
Hi, I performed this code but it did. What is the reason? How should I make it?
a = 10
b = 0
print(a / b)
ZeroDivisionError: division by zero
Hi, I performed this code but it did. What is the reason? How should I make it?
a = 10
b = 0
print(a / b)
ZeroDivisionError: division by zero
Hi Python does not divide any numbers by 0 you encounter a Division Zero error error
If you are just going to print numbers you should use: (A, B) Print Dear friend
Because it won't be divided by zero if zero is made.
This error means you are dividing a number by zero !!!!
This cannot be done because it is one of the defined in mathematics.
No zero numbers are divided, change that number.
Because for the system and ... the number is not defined by zero.
The reason for the error is divided by zero. To avoid this erro, you should check thatbNot zero. Modified code:
a = 10
b = 0
if b != 0:
print(a / b)
else:
print("Cannot divide by zero")
Hi. The reason for this Error is that you are trying to divide a division by zero, for example, if I write 5 divided by 0 this Error because it cannot be divided by 5 by 0
Submitting answers is currently unavailable.
You must be logged in to access this section.
Login/Sign up If you don’t understand the exercise or can’t solve it for any reason, that’s completely
normal—don’t worry 😊
Try checking out easier exercises and reviewing different answers
submitted by others. Gradually, you can move on to more challenging exercises. Also, your answer
might be correct even if it’s different from others.