Python Practical Assignment Solutions Full
Python Practical Assignment Solutions Full
a, b = 0, 1
while a <= 50:
print(a, end=' ')
a, b = b, a + b
try:
x = int(input("Enter dividend: "))
y = int(input("Enter divisor: "))
result = x / y
except ZeroDivisionError:
print("Error: Cannot divide by zero!")
else:
print("Result:", result)