3 Question- How to print all odd number between 1 to 50 in Python Language? Answer- for a in range(1,51,2): print(a) or for a in range(1,51): if(a%2!=0): print(a)
4 Question- How to print factorial of any given number in Python Language? Answer- num=int(input("Enter a number")) f=1 for a in range(1,num+1): f=f*a print("Factorial of given number ", num, "is :", f)