What will be output of the following code if the user enters Principal amount as
20000 and Time as 10 years.
#Considering Python 2.7
P = input("Enter Principal amount:")
T = input("Enter Time:")
if T>10:
SI = P*T*10/100
else:
SI = P*T*15/100
print("Simple Interest = ",SI)
OR
#Considering Python 3.x
P = input("Enter Principal amount:")
T = input("Enter Time:")
if T>10:
SI = P*T*10/100
else:
SI = P*T*15/100
print("Simple Interest = ",SI)
Answers
Answered by
4
What will be output of the following code if the user enters Principal amount as
20000 and Time as 10 years.
#Considering Python 2.7
P = input("Enter Principal amount:")
T = input("Enter Time:")
if T>10:
SI = P*T*10/100
else:
SI = P*T*15/100
print("Simple Interest = ",SI)
OR
#Considering Python 3.x
P = input("Enter Principal amount:")
T = input("Enter Time:")
if T>10:
SI = P*T*10/100
else:
SI = P*T*15/100
print("Simple Interest = ",SI)
Similar questions