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
Which type(s) of license(s) allow the underlying software code to be viewed?
morpeh [17]

Answer:

The correct answer is B. Free software.

Explanation:

Free software is a term used for software that the holder can use, copy, read, modify and distribute with or without modification at will. Software that falls under this category includes software that is not protected by copyright laws or software that is licensed to be used in this way.

Motives for developing free software can be technical, economic or social. What is significant for developers is the desire to develop as producers of programs by learning from other producers. The desire to help others is also a major motive.

8 0
3 years ago
Virtualization:
Sedaia [141]

Answer:

C. can boost server utilization rates to 70% or higher.

Explanation:

Virtualization -

It is the process of running virtual instance of the computer in the abstracted layer from the very actual hardware , is known as virtualization .

In this process multiple operating system can be operated on the single computer setup , it is useful for increasing the speed of the program.

Hence, from the question,

The correct statement with respect to virtualization is C. can boost server utilization rates to 70% or higher .

8 0
3 years ago
What are the three main components of a for loop?
insens350 [35]

Answer:

Similar to a While loop, a For loop consists of three parts: the keyword For that starts the loop, the condition being tested, and the EndFor keyword that terminates the loop.

Explanation:

Loop statements usually have four components: initialization (usually of a loop control variable), continuation test on whether to do another iteration, an update step, and a loop body.

8 0
3 years ago
Recursion occurs when a function (calls itself/ calls another function/ calls a function from the python standard library)
lesantik [10]

Answer:

Recursion is calling of a function from within that same function

5 0
3 years ago
Match the job roles with their appropriate qualifications
UNO [17]
Knowledge...- software QA engineer
Master’s...- business analyst
course...- network and computer admin
training...- multimedia artist
3 0
3 years ago
Other questions:
  • Using a loop, write a program that reads in exactly five integers and outputs the sum.
    11·1 answer
  • Select the correct answer. Which sentence best describe an effective management strategy? A. Conceal game-related clippings prio
    12·2 answers
  • Molly, an end-user, connects an external monitor, external keyboard and mouse, and a wired network cable to her laptop while wor
    5·2 answers
  • What term is used to refer to the way companies collect and process data in order to create new information to make important bu
    13·1 answer
  • What was the technology that defined each of the four generations of computers?
    12·1 answer
  • The database must be carefully planned to allow useful data manipulation and report generation.
    10·1 answer
  • You are the leader of a team at work. What type of leader would you like to be – one that gets involved and works with the team
    15·2 answers
  • In linear​ programming, what are restrictions that limit the degree to which a manager can pursue an​ objective?
    15·1 answer
  • What is an antispamming approach where the receiving computer launches a return attack against the spammer, sending email messag
    9·2 answers
  • A user complains that the pointer movement on his laptop computer is very erratic what should you do?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!