I was trying to create a simple python code for finding HCF of two numbers using Euclid’s method
a = int(input('Enter the first number: '))
b = int(input('Enter the second number: '))
while a != b:
rem = int(a) % int(b)
a = b
b = rem
print('The HCF is', a)
and I got a error like
Traceback (most recent call last):
File “C:UsersPycharmProjectsHCF.py”, line 4, in
rem = int(a) % int(b)
~~~~~~~^~~~~~~~
ZeroDivisionError: integer modulo by zero