python programs for 11 cs
python programs for 11 cs
Factorial of a Number
# Program to calculate the factorial of a number
if is_prime:
print(f"{n} is a prime number")
else:
print(f"{n} is not a prime number")
Multiplication Table
# Program to print the multiplication table of a number
while n > 0:
sum_digits += n % 10
n = n // 10