Program To Find Largest Number Among 3 Numbers ,Program To Generate Even Numbers,Program To Generate Fibonacci Series

1. Program To Find Largest Number Among 3 Numbers Entered By  User.

a=int(input("\n   Enter num1 = "))
b=int(input("\n   Enter num2 = "))
c=int(input("\n   Enter num3 = "))
if (a>b and a>c):
    print("\n ",a," is greater")
if (b>a and b>c):    
     print("\n ",b,"  is greater")
if (c>a and c>b):
      print("\n ",c,"\n  is greater")



OUTPUT:

                    


--------------------------------------------------------------------------------------------------

2. Program To Generate Even Numbers Upto The Digit Entered By The User



print("\n\n ****** Even Number Generator *****\n\n")
num=int(input("\n Enter The Value To Which Even Number Is To Be Generated = "))
even=0
print("   ",even)
while(even<num):
    even=even+2
    print("   ",even)


OUTPUT:



--------------------------------------------------------------------------------------------------

3. Program To Generate Fibonacci Series

print("\n\n ***** Fibonacci Series Generator ***** \n\n")
num=int(input("\n Enter The Values Upto Which Series Required = "))
a=0
b=1
c=a+b
print("\n\n Fibonacci Series Is = \n","\n  ",a,"\n  ",b,"\n  ",c)
for i in range(a+1,num-2):
    a=b
    b=c
    c=a+b
    print("  ",c)


OUTPUT:


Comments