For loop first 5 programme
For loop first 5 programme
for i in range(1,11):
rn=""
for digit in n :
rn = digit + rn
#(note-gap is important)
rn = int(rn)
b=0
c=1
for i in range(a):
b, c = c, b + c
b=0
c=0
d=1
for i in range(a):
b, c, d = d, c, b + c + d
#Write a Python program to calculate the sum of all even numbers from 1 to n numbers.
sum=0
if n % 2 == 0 :
sum += n