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
What was the worlds first coding language
svetoff [14.1K]

Answer:

lol baby

Explanation:

becuase it goated

8 0
2 years ago
Read 2 more answers
You are the manager and an employee shows up for his shift dressed inappropriately for work. What should you do?
yarga [219]

Most managers see inappropriate dressing every day. Some are left angered while some are confused as to what is the right way to approach such situations. What follows next needs to be professional oriented. Being the manager, I would start by finding out what the appropriate dressing policies are. Some companies might have dress code policies while others might not. Assuming that this company has, I would read these policies carefully. The next thing that is required from me is to have a small conversation with the employee discretely. As professional as I can be, I will mention how I feel his or her dress code is inappropriate and try to summon the employee by asking him or her whether they are fully aware of the appropriate dress code. I will try to agree with the employee on what is appropriate and what is not. If we agree, requesting the employee to home and change clothes is unnecessary, but if the need to do that arises, I would consider that to be an option.

7 0
3 years ago
Read 2 more answers
The World Wide Web Consortium enforced a stricter set of standards in a different version of Hypertext Markup Language (HTML) ca
Eva8 [605]

Answer:

Option B is the correct answer for the above question

Explanation:

XHTML is an advanced version of HTML language which is recommended by W3C. It set the standard in 26-JAN-2000 for the XHTML which belongs to the family of HTML. XHTML is made with the help of XML and also used like XML. It used to create more secure websites.

The Above question asked about the W3C recommendation but the above paragraph described that XHTML is a W3C recommendation. Hence Option B is the correct choice answer. while the other is not because--

  • Option A suggests HTML 4.01 which is the updated version of HTML only.
  • Option C suggests XML which is used to data transfer only.
  • Option D suggests about DHTML but XHTML is a W3C recommendation
5 0
3 years ago
n a​ poll, 6767​% of Internet users are more careful about personal information when using a public​ Wi-Fi hotspot. What is the
a_sh-v [17]

Answer:

The probability that among three randomly selected Internet​ users, at least one is more careful about personal information when using a public​ Wi-Fi hotspot is 0.964

If the survey subjects <em>volunteered</em> to​ respond , then those with the strongest opinions are most likely respond. The survey sample is then not randomly selected, the survey may have a <em>response bias.</em>

Explanation:

Let P(at least one is more careful about personal information when using a public​ Wi-Fi hotspot) denote the probability that among three randomly selected Internet​ users, at least one is more careful about personal information when using a public​ Wi-Fi hotspot, then we have the equation

P(at least one is more careful about personal information when using a public​ Wi-Fi hotspot) = 1 - P(none of the selected users is more careful about personal information when using a public​ Wi-Fi hotspot)

  • If 67​% of Internet users are more careful about personal information when using a public​ Wi-Fi, then 33% of them are not.

P(none of the selected users is more careful about personal information when using a public​ Wi-Fi hotspot) = 0.33^{3} ≈ 0.036

P(at least one is more careful about personal information when using a public​ Wi-Fi hotspot)  = 1 - 0.036 = 0.964

4 0
3 years ago
Why are medical coders using encoded software
EastWind [94]
To keep the medical records confidential otherwise, hackers would take advantage of them and sell them to the highest bidder 
3 0
3 years ago
Other questions:
  • Have you ever used a device that relies solely on the cloud?
    10·1 answer
  • How can you logout your account and do not want to have this anymore
    12·2 answers
  • PLEASE HELPP!! WILL MARK BRAINLIEST!!~~~~~
    11·1 answer
  • Ray has to type an invoice using the QWERTY keyboard. Along with letters and numbers, he also has to insert the dollar sign. Whi
    13·1 answer
  • What command limits structural changes, such as adding, deleting, or moving sheets, that can be made in a workbook?
    13·1 answer
  • Consider the following protocol for concurrency control. The database system assigns each transaction a unique and strictly incr
    6·1 answer
  • How many bits would be in the memory of a computer with 4kb memory?
    8·1 answer
  • True or False
    11·1 answer
  • Return a version of the given string, where for every star (*) in the string the star and the chars immediately to its left and
    11·1 answer
  • Find examples of conic sections in art and architecture. Visit Web sites to find pictures of artwork or buildings that illustrat
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!