programs
programs
if x1 == x:
print('palindrome')
else:
print('not a palindrome')
print(pal('edureka'))
-----------------------------
FIBONACCI SERIES
while n-2:
c = a + b
a = b
b = c
print(c, end=" ")
n = n-1
Following is the program to check whether a number is an armstrong
number or not.
def add(a,b):
return a+b
def sub(a,b):
return a-b
def prod(a,b):
return a * b
def div(a,b):
return a / b
def sqr(num):
return num**2
def sqrt(num)
return num**0.5
print(add(10,15))
#to add two numbers, similarly you can use other functions for other operations.
num = 5
a = (2 * num) - 2
for i in range(0, num):
for j in range(0, a ):
print(end=" ")
for j in range(0, i+1)
print('*' , end=" ")
print(" ")
# List of numbers
numbers = [6, 5, 3, 8, 4, 2, 5, 4, 11]