All Programs
All Programs
if number % 2 == 0:
print("The number is Even.")
else:
print("The number is Odd.")
while no > 0:
ans = no % 10
sum += ans ** 3
no //= 10
if sum == no1:
print("Armstrong Number")
else:
print("Not an Armstrong Number")
if num < 0:
print("Factorial is not defined for negative numbers.")
else:
print(f'The factorial of {num} is {factorial_iterative(num)}.')
if result != -1:
print(f'The number {target} is found at index {result}.')
else:
print(f'The number {target} is not found in the list.')