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
Windows workstations all have elements of server software built-in. What are these elements, and why is the Windows Professional
lions [1.4K]

Answer:

The answer is below

Explanation:

Elements of Server software that is built-in, in Windows workstations are:

1. Hard drives,

2. RAM (Random Access Memory)

3. Processors

4. Network adapters.

Windows Professional OS is not considered a server due to the following:

1. Windows Professional OS has a limit on the number of client connections it allowed.

2. Unlike Server, Professional OS uses less memory

2. In comparison to Server, Professional OS uses the CPU less efficiently

4. Professional OS is not built to process background tasks, unlike Server that is configured to perform background tasks.

6 0
3 years ago
A computer retail store has 15 personal computers in stock. A buyer wants to purchase 3 of them. Unknown to either the retail st
Dima020 [189]

Answer:

a. 1365 ways

b. Probability = 0.4096

c. Probability = 0.5904

Explanation:

Given

PCs = 15

Purchase = 3

Solving (a): Ways to select 4 computers out of 15, we make use of Combination formula as follows;

^nC_r = \frac{n!}{(n-r)!r!}

Where n = 15\ and\ r = 4

^{15}C_4 = \frac{15!}{(15-4)!4!}

^{15}C_4 = \frac{15!}{11!4!}

^{15}C_4 = \frac{15 * 14 * 13 * 12 * 11!}{11! * 4 * 3 * 2 * 1}

^{15}C_4 = \frac{15 * 14 * 13 * 12}{4 * 3 * 2 * 1}

^{15}C_4 = \frac{32760}{24}

^{15}C_4 = 1365

<em>Hence, there are 1365 ways </em>

Solving (b): The probability that exactly 1 will be defective (from the selected 4)

First, we calculate the probability of a PC being defective (p) and probability of a PC not being defective (q)

<em>From the given parameters; 3 out of 15 is detective;</em>

So;

p = 3/15

p = 0.2

q = 1 - p

q = 1 - 0.2

q = 0.8

Solving further using binomial;

(p + q)^n = p^n + ^nC_1p^{n-1}q + ^nC_2p^{n-2}q^2 + .....+q^n

Where n = 4

For the probability that exactly 1 out of 4 will be defective, we make use of

Probability =  ^nC_3pq^3

Substitute 4 for n, 0.2 for p and 0.8 for q

Probability =  ^4C_3 * 0.2 * 0.8^3

Probability =  \frac{4!}{3!1!} * 0.2 * 0.8^3

Probability = 4 * 0.2 * 0.8^3

Probability = 0.4096

Solving (c): Probability that at least one is defective;

In probability, opposite probability sums to 1;

Hence;

<em>Probability that at least one is defective + Probability that at none is defective = 1</em>

Probability that none is defective is calculated as thus;

Probability =  q^n

Substitute 4 for n and 0.8 for q

Probability =  0.8^4

Probability = 0.4096

Substitute 0.4096 for Probability that at none is defective

Probability that at least one is defective + 0.4096= 1

Collect Like Terms

Probability = 1 - 0.4096

Probability = 0.5904

8 0
3 years ago
The salespeople at hyperactive media sales all use laptop computers so they can have easy access to important data on the road.
laiz [17]

Answer:

By backing up the important information from the laptop computers to OneDrive, if a hard drive failure is to occur, assuming the salespeople have internet, they may access OneDrive and download any and all applicable data, resolving the issue.

6 0
3 years ago
Read the following scenario, and then answer the question below.
shtirl [24]
Establish what skills are required to reach his goal
8 0
3 years ago
Read 2 more answers
Suppose that a disk drive has 5,000 cylinders, numbered 0 to 4,999. The drive is currently serving a request at cylinder 2,150,
Zina [86]

Answer:

The queue pending requests of FIFO order is ;

86, 1470, 1774, 948, 1509, 1022, 1750, 130.

Explanation:

The FCFS schedule is 143, 86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130.

Total seek distance is 7081.

The SSTF schedule is 143, 130, 86, 913, 948, 1022, 1470, 1509, 1750, 1774.

Total seek distance is 1745.

The LOOK schedule is 143, 913, 948, 1022, 1470, 1509, 1750, 1774, 130, 86.

Total seek distance is 3319.

The SCAN schedule is 143, 913, 948, 1022, 1470, 1509, 1750, 1774, 4999, 130, 86.

Total seek distance is 9769.

7 0
3 years ago
Other questions:
  • What does hdtv stand for
    7·2 answers
  • Getting access to web browsing software to install it on a computer or to update your existing software is called _________ .
    9·2 answers
  • Which of the following illustrates an example of a Boolean data type?
    15·1 answer
  • If Chris has a car liability insurance, what damage would he be covered for
    10·1 answer
  • What are 2 plants that grow best in our soil type ​
    9·1 answer
  • Danielle, a help desk technician, receives a call from a client. In a panic, he explains that he was using the Internet to resea
    9·1 answer
  • Lamp is an acronym for a complete solution of open source software that goes together to build a general purpose web server. whi
    13·1 answer
  • Hich of these statements is a value statement?
    14·2 answers
  • Write a program to display MPH (Miles per Hour). Create a function to calculate the MPH. Ask the user for the number of miles dr
    11·1 answer
  • Clara works behind a computer all day. She gets a lot of headaches, and her eyes have been hurting her lately. Her doctor diagno
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!