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
How do you turn on the Track Changes feature in a word-processing document?
aniked [119]
Click options in the tools menu and select track changers
5 0
3 years ago
Technology is (BLANK.1 ) science that makes (blank.2) science useful and practical.
Hoochie [10]

Answer:

Example

Explanation:

Example

5 0
3 years ago
Read 2 more answers
What are QBASIC Operators ?​
Anna35 [415]

Answer: There are four types of operators in QBASIC. They are Arithmetic Operators, Relational Operators, Logical Operators and Sting Operator. a. Arithmetic Operators. Arithmetic Operators are used to perform mathematical calculations like addition, subtraction, division, multiplication and exponential. :)

5 0
3 years ago
Read 2 more answers
48
Irina-Kira [14]

The statement that best explains the benefit that higher page placement provides those who use search engine optimization well is option A. People are more likely to click the first results than those further down the page.

<h3>What advantages do search engine results pages offer?</h3>

Search engine results pages (SERPs) typically feature paid search and pay-per-click (PPC) advertisements in addition to organic search results. Since consumers are more inclined to click on results at the top of the page, ranking position on a SERP can be very competitive thanks to search engine optimization (SEO).

Therefore, Search engine optimization, or SEO, is the act of enhancing your website to raise its natural prominence for particular search queries. Through onsite adjustments, SEO seeks to increase both the quality and volume of traffic to your website.

Learn more about search engine optimization from

brainly.com/question/14097391
#SPJ1

3 0
1 year ago
When text is used as a Hyperlink, it is usually underlined and appears as a different color.
Artist 52 [7]
True it usually shows up with a blue underline
7 0
3 years ago
Other questions:
  • Which formula returns TRUE, if the value in cell B1 is less than 40 and the value in C1 is less than 100?
    7·2 answers
  • What would be the desired output of a home security system?
    6·1 answer
  • Samantha received a gaming session as a gift. She would like to have it communicate with her sister Jennifer’s gaming system so
    15·1 answer
  • ________ errors may indicate that an attacker is trying to send invalid data to the server. 404 303 500 512
    11·1 answer
  • How to change default search engine in internet explorer 11?
    13·1 answer
  • WILL GIVE BRAINLIEST!!!
    15·2 answers
  • You are almost finished updating a Website. As part of the update, you have converted all pages from HTML 4.0 to HTML5. The proj
    7·1 answer
  • If you convinced your teacher to give you an extension on an assignment, what would this situation be an example of? OA. General
    8·1 answer
  • What are some other projects or things you do in your life (other than writing an essay) where you use an iterative process?
    9·2 answers
  • The lost boy gave the correct
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!