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
Olin [163]
3 years ago
10

write a function interest() that takes one input, a floating-point interest rate (e.g., 0.06, which corresponds to a 6% interest

rate). your function should compute and return how long (in years) it will take for an investment to double in value. note: the number of years it takes for an investment to double does not depend on the value of the initial investment.
Computers and Technology
1 answer:
Novay_Z [31]3 years ago
8 0

Code:

def interest():

   interest_rate = 0.06

   investment = input(int('Investment: '))

   yield = 0

   year = 0

   while (yield < investment):

       year += 1

       yield  = investment * interest_rate

   print (year)

NOTE: i wrote this code assuming that the investment for the next year is the same as the first year and so forth

You might be interested in
Hi there! I just started my beginner computer science class and I was wondering if anyone wants to help with an assignment i'm h
Alik [6]

After looking at your question, I reasoned you were writing this in python. Here's my code, I hope it helps!

while True:

   v1 = input("Enter value of first variable (T/F) ")

   v2 = input("Enter value of second variable (T/F) ")

   v3 = input("Enter value of third variable (T/F) ")

   print("v1: {}, v2: {}, v3: {} = T".format(v1, v2, v3) if v1 == "T" and v2 == "T" or v1 == "T" and v3 == "T" else "v1: {}, v2: {}, v3: {} = F".format(v1, v2, v3))

5 0
3 years ago
How many parameters go into the function sum, and how many return values come out of the function sum? function sum(first, secon
zhannawk [14.2K]

Answer:

3 parameters are passed into the function.

1 value will be returned from the function.

Explanation:

From the function definition "function sum(first, second, third)", we can see  that there are three value/parameters are passed in the function.Then variable "result" will be the sum all the three values. After that it will print the all three values in new line. Then the function will return one value which is the  sum of all three that is value of "result".As there is only one value returned  by the return statement in the function.

6 0
3 years ago
What are the different ways one can adjust their communication in order to decrease noise?
soldier1979 [14.2K]

Answer

You can  whisper,write notes, text, e-mail, body language, and even use a sign language.

Explanation

By adjusting your communication in these ways one can decrease noise. Whispering is where you speak softly to someone where the information will be only heard by the person you are addressing and this will not make any noise. Also use of a text or an email where the message will be delivered electronically but not verbally. Then there is the body language which is a nonverbal  but a physical behavior used to express a certain information or also one can use sign language.

5 0
3 years ago
Read 2 more answers
Write the pseudocode for this flowchart
MrMuchimi

Answer:

Explanation:

class TimeToSleep() {

  main bunch of stuff (string argos) {

       int age;

       string comedy;

       bool guess;

        public bool imTheMasterMethod() {

           guess = true;

           while (guess) {

              comedy = "You forgot to put the flowchart, you meathead!";

              println(comedy);

               

                scan("%d", &age);

                if (age < 18) {

                    println("Go to sleep kiddo!");

                }

           }

        }

   }

}

       

6 0
2 years ago
What are the five types of docs you can create an share with google docs
Mademuasel [1]

Answer:

Documents: For composing letters, flyers, essays, and other text-based files (similar to Microsoft Word documents)

google sheets logo Spreadsheets: For storing and organizing information (similar to Microsoft Excel workbooks)

google slides logo Presentations: For creating slideshows (similar to Microsoft PowerPoint presentations)

google forms logo Forms: For collecting and organizing data

google drawings logo Drawings: For creating simple vector graphics or diagrams

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • 7. What is the school campus’s setting<br> the school is sanford
    6·2 answers
  • A c++ member function that uses, but does not change, the value of a member variable is called
    13·1 answer
  • Which is the correct formula to add the values in cells A1 and B1? A. SUM(A1+B1) B. =SUM(A1+B1) C. =SUMA1+B1 D. A1+B1
    9·2 answers
  • To paste text with the same formatting as the document in which it is entered, select _____ from the Paste menu. Keep Source For
    12·2 answers
  • If you see ##### in a cell, you should
    10·1 answer
  • What is the maximum upload speed you can get on an isdl internet connection?
    9·1 answer
  • What is renewable energy
    13·2 answers
  • What arw two reasons for maintaning your privacy on the internet
    11·2 answers
  • Which part of the operating system enables you to interact with the device? Question 9 options: The graphical user interface The
    8·1 answer
  • How does your ability to correctly count change affect the impression the customer has of you?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!