Computer Science
Write a program to obtain principal amount, rate of interest and time from user and compute simple interest.
Python
Python Data Handling
125 Likes
Answer
p = float(input("Enter principal: "))
r = float(input("Enter rate: "))
t = float(input("Enter time: "))
si = p * r * t / 100
print("Simple Interest =", si)
Output
Enter principal: 55000.75
Enter rate: 14.5
Enter time: 3
Simple Interest = 23925.32625
Answered By
67 Likes
Related Questions
Consider the code given below:
import random r = random.random() * 10 print(r, end = ' ') r = random. random() * 10 print(r, end = ' ') r = random.random() * 10 print(r)
Which of the following are the possible outcomes of the above code? Also, what can be the maximum and minimum number generated by line 2 ?
(a) 0.5 1.6 9.8
(b) 10.0 1.0 0.0
(c) 0.0 5.6 8.7
(d) 0.0 7.9 10.0Consider the code given below:
import statistics as st v = [7, 8, 8, 11, 7, 7] m1 = st.mean(v) m2 = st.mode(v) m3 = st.median(v) print(m1, m2, m3)
Which of the following is the correct output of the above code?
(a) 7 8 7.5
(b) 8 7 7
(c) 8 7 7.5
(c) 8.5 7 7.5Write a program to obtain temperatures of 7 days (Monday, Tuesday … Sunday) and then display average temperature of the week.
Write a program to obtain x, y, z from user and calculate expression : 4x4 + 3y3 + 9z + 6π