Programming in PYTHON - 2020 (Most uses Programming language Questions)

Write a program in python to calculate simple interest.

Codes : 
 #This is the formula simple intrerest = principle*time*rate so lest move

principle = float(input("Input the Principle Amount :\n"))

time = int(input("Enter the time (Years) :\n"))

rate= float(input("Input the Rate: \n"))

simple_interest = (principle*time*rate)/100

print("Simple Interest is :", simple_interest)
 
exit()
 
 
 
 
     Write a program in python to print Fibonacci series.
Codes:
 
def fib(n):
 
    a = 0
 
    b = 1
 
    if n == 1:
 
        print(a)
 
    else:
 
        print(a)
 
        print(b)
 
        for i in range(2, n):
 
            c = a + b
 
            a = b
 
            b = c
 
            print(c)
 
fib(int(input("Enter your value : ")))
 
#fib(5)  We can also set the length of Number like 1 to 5 or 1 to 20 whatever we wants ok...
 
exit()




 

Post a Comment

Previous Post Next Post