You are on page 1of 3

Task 10

Arjama Kundu
1928160
1.
num=int(input("enter a number?"))
s=str(num)[::-1]
s1=int(s)
if s1==num:
print(f"{num} is palindrome")
else:
print(f"{num} is not palindrome")

2.

a=int(input("enter a"))
b=int(input("enter b"))
i=a
while i<=b:
if i%3==0 and i%5==0:
print(f"{i} is a multiple of 3 and 5")
i+=1
3.
from math import factorial
i=int(input("enter a number?"))
print("Factorial is : ",factorial(i))

4.

n=int(input("enter n"))
a=0
b=1
print("FIBO SERIES:".center(10))
print(a,b,end=" ")
c=a+b
while c<=n:
print(c,end=" ")
a=b
b=c
c=a+b
5.

n=int(input("enter a number"))
i=n
s=0
while i>0:
r=int(i%10)
s+=pow(r,3)
i=int(i/10)
r=0
if s==n:
print("armstrong")
else:
print("not")

You might also like