1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Talja [164]
3 years ago
6

Write a program in Python to input Principle Amount, Rate, Time and a choice

Computers and Technology
1 answer:
AfilCa [17]3 years ago
3 0

Answer:

P = float(input("Principal Amount: "))

R = float(input("Rate: "))

T = float(input("Time: "))

option = int(input("1 for Simple Interest, 2 for Compound interest: "))

if option == 1:

    Interest = (P * R * T)/100

    print("Interest: "+str(Interest))

elif option == 2:

    Interest = P * (1 + R/100)**t

    print("Interest: "+str(Interest))

else:

    print("Invalid Selection")

Explanation:

The next three line prompt user for Principal Amount, Rate and Time

<em>P = float(input("Principal Amount: "))</em>

<em>R = float(input("Rate: "))</em>

<em>T = float(input("Time: "))</em>

<em>This line prompts user for option (1 for Simple Interest, 2 for Compound interest)</em>

option = int(input("1 for Simple Interest, 2 for Compound interest: "))

If option is 1, simple interest is calculated

<em>if option == 1:</em>

<em>     Interest = (P * R * T)/100</em>

<em>     print("Interest: "+str(Interest))</em>

If option is 2, compound interest is calculated

<em>elif option == 2:</em>

<em>     Interest = P * (1 + R/100)**t</em>

<em>     print("Interest: "+str(Interest))</em>

If option is neither 1 nor 2, Invalid Selection is printed

<em>else:</em>

<em>     print("Invalid Selection")</em>

You might be interested in
Enterprise systems help managers and companies improve their performance by enabling them to __________.
Sonbull [250]

Answer: b)seamlessly share real-time data internally among departments and with external business partners.

Explanation: Enterprise system are type of software section that provides the facility of controlling and tracing of the operation in business organizations.They helps in making the business automatic, trading of data in different organization sectors internally and externally as well, reporting etc.

Other options are incorrect because it does not transfers the data using emails,outsourcing the process to vendors and combining data into central hub.Thus, the correct option is option (b).

4 0
3 years ago
Styles are modified by using the Office clipboard in the Home tab. true or false
cluponka [151]
Your answer is false
7 0
3 years ago
Read 2 more answers
Pls help! for computers edge 2021
KATRIN_1 [288]
I believe it is the first one, i did some research for this question
7 0
3 years ago
Really helpful, I want to get together tomorrow ,Later I will follow and make it the best answer
blagie [28]

Answer:

c

Explanation:

8 0
2 years ago
How does a MIPS Assembly procedure return to the caller? (you only need to write a single .text instruction).
AnnyKZ [126]

Answer:

A MIPS Assembly procedure return to the caller by having the caller pass an output pointer (to an already-allocated array).

8 0
3 years ago
Other questions:
  • What is the next series of dragon ball super
    6·2 answers
  • What does a graphic organizer do
    6·1 answer
  • Question 1 (1 point)
    10·2 answers
  • Although you can use a dialog box to indent paragraphs, word provides a quicker way through the ____.
    7·1 answer
  • The computer mouse is used to
    11·1 answer
  • Place the steps in order to keep a graphic from spilling over into the next page and to include the text it is assciated with.
    12·1 answer
  • Can you guys help me plz <br> I want c++ code
    12·1 answer
  • How do i delete an account for brainly how do i delete everything
    7·2 answers
  • Which of the following is NOT areserved word in Java?intpublicstaticnum
    9·1 answer
  • How is the architecture converted into software code? Elaborate the steps its passes through with help of examples / Diagram.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!