''' Write a program to display the first 10 natural numbers. for i in range(1,11): print(i) ''' #Write a C program to find the sum of first 5 natural numbers. ''' s=0 for i in range(1,6): s=s+i print(s) ''' #Write a program to display n terms of natural number and their sum ''' n=int(input("enter no")) s=0 for i in range(1,n+1): s=s+i print("value of natural no",i, "sum of natural no",s) ''' #Write a program to display the cube of the number upto given an integer. ''' n=int(input("enter no")) for i in range(n+1): print(i**3) ''' #Write a program to display the multiplication table of a given integer. ''' n=int(input("enter no")) #s=int(input("enter starting value")) #e=int(input("enter ending value")) for i in range(1,11): print(n,"x",i,"=",n*i) ''' #Write a program to display the n terms of odd natural number and their sum ''' n=int(input("enter no")) s=0 for i in range(1,n+1,2): s=s+i print("value of natural no",i, "sum of natural no",s) ''' ##Write a program to display the n terms of even natural number and their sum ''' n=int(input("enter no")) s=0 for i in range(0,n+1,2): s=s+i print("value of natural no",i, "sum of natural no",s) ''' #Write a program to calculate the factorial of a given number. n=int(input("enter no")) s=1 for i in range(n,0,-1): s=s*i print( "factorial of a no",s) # OR n=int(input("enter no")) s=1 for i in range(1,n+1): s=s*i print("value of natural no",i, "factorial of a no",s)