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
inn [45]
3 years ago
13

Create the logic for a program that calculates and displays the amount of money you would have if you invested $5000 at 2 percen

t interest for one year. Create a separate method to do the calculation and return the result to be displayed.

Computers and Technology
2 answers:
avanturin [10]3 years ago
8 0

Answer:

# main function is defined

# the calculateAmount is called here

def main():

   print("The new amount is: ", calculateAmount(), sep="")

   

# calculateAmount function that calculate the interest

def calculateAmount():

   # the value of principal is p

   p = 5000

   # the value of rate is r

   r= 2

   # the time is t

   t = 1

   # the formula for finding interest

   interest = (p * r * t) / 100

   # the new amount is calculated

   amount = p + interest

   # the amount is returned

   return amount

# a call that make main function begin execution

if __name__ == "__main__":

   main()

Explanation:

The program is written in Python and it is well commented. A screenshot is attached showing program output

Wewaii [24]3 years ago
4 0

Answer:

public class num7 {

   /* Interest = (Principal *Rate*Time)/100

       Total amount you will have = principal (5000)+Interest

    */

   public static void main(String[] args) {

       double prinAmount = 5000;

       System.out.println("The total amount is "+(calInterest(prinAmount)));

   }

   static double calInterest(double principal){

       int time =1;

       double rate = 2.0;

       double interest = (principal*rate*time)/100;

       double principalPlusInterest = principal+interest;

       return principalPlusInterest;

   }

}

Explanation:

The Logic for this program is:

Interest = (Principal *Rate*Time)/100

Total amount you will have = principal (5000)+Interest

The method calInterest()  accepts a double parameter (principal Amount) and uses the logic above to calculate and return the total amount.

The Main Method calls calInterest() and outputs the value calculated in this case since it is hardcoded 5100

You might be interested in
Show a parse tree and a leftmost derivation for : B = C * (A + B)
11111nata11111 [884]

Answer:

mhyfocnu,sobgu,kvngwugwe8hri

Explanation:

sovijbjxyzkuvcg

7 0
3 years ago
After a business transaction has been analyzed, which of the following must occur for the analysis to have been done correctly?
ICE Princess25 [194]

Answer:

A. Equity must equal the difference between assets and liabilities.

Explanation:

Assets are things a company or business owns while liabilities are things person or company owes.

Thus, Equity is the difference between the assets and the liabilities.

So, option A which is <u>Equity must equal the difference between assets and liabilities</u> is the answer.

5 0
3 years ago
Simone frequently downloads mobile apps from Amazon Appstore. What operating system does she have on her smartphone?
Angelina_Jolie [31]
She has the Android operating system if she’s frequently downloading mobile apps from the Amazon App Store as opposed to IOS which is the Apple operating system.
7 0
3 years ago
It is a life long skills like spelling, it is a skill of typing data currently and quickly using a computer keyboard
viva [34]
Is this a riddle bro?
6 0
3 years ago
Bob's Assembly is a hardware manufacturer. It specializes in builders' hardware for doors, cabinets, windows, and bathrooms. Bob
Snezhnost [94]

Answer:

distinctive competence

Explanation:

The distinctive competence denotes the various characteristic of certain business on which behalf that business perform better than its competitors. And since the business succeeds in doing those things better than its competitors, that business gains a competitive advantage over its competitors. And here, Bob's assembly is a hardware manufacturer for the doors, cabinets, windows and the bathrooms. And his assembly products are more durable and economical than its competitor's products. And thus Bob has a competitive advantage over its competitors.

3 0
4 years ago
Other questions:
  • Which steps will complete adding the cells A45 to A55?
    8·1 answer
  • Write a copy assignment operator for CarCounter that assigns objToCopy.carCount to the new objects's carCount, then returns *thi
    7·1 answer
  • The Internet is a hierarchical structure linking different levels of service providers whose millions of devices supply all the
    13·1 answer
  • He has a new Wi-Fi router that connects wirelessly to a new desktop and two new laptops, in addition to multiple smartphones, ta
    8·1 answer
  • What will the following code display? #include using namespace std; void doSomething(int); int main() { int x{2}; cout &lt;&lt;
    9·1 answer
  • Which of the following conditions will maximize the amount of interest you earn
    5·1 answer
  • Which of the following art forms gained in popularity during the Renaissance?
    10·2 answers
  • You’ve found the file you’ll be working with. Next, you decide to move the file to your Desktop so it will be easier to get to i
    14·1 answer
  • A(n) _____ is a network connection device that can build tables that identify addresses on each network.
    10·1 answer
  • Select the correct text in the passage.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!