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]
2 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]2 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
Which of the following storage devices allows access to information in a sequential mode?
katrin [286]
It is either hard drive or solid state drive
4 0
2 years ago
Read 2 more answers
Why is it important to follow a consistent naming convention for variables?
Vitek1552 [10]

Answer:

today I am going to be out for the job interview so if I will make it happen I am going to New Orleans this week to get the kids to work on the spot and I can get ready to go out to dinner and I can make a few more people

4 0
2 years ago
Suppose you are given a string containing only the characters ( and ). In this problem, you will write a function to determine w
Whitepunk [10]

Answer:

Code is completed below

Explanation:

Source Code in Java:

class Parenthesis

{

boolean hasBalancedParentheses(String eq) //method to check and return if a set of parenthesis is balanced or not

{

int count=0; //to store count of current unclosed opening brackets

for(int i=0;i<eq.length();i++)

{

if(eq.charAt(i)=='(')

count++;

else if(eq.charAt(i)==')')

count--;

if(count<0) //if count falls below zero, there were more closing brackets than opening brackets till this point

return false;

}

if(count>0) //if count is still more than zero, there were less closing brackets than opening brackets

return false;

return true; //if program reaches this point, it has passed all the tests

}

public static void main(String args[])

{

//testing the function

Parenthesis ob=new Parenthesis();

System.out.println(ob.hasBalancedParentheses("()(()())((())())"));

System.out.println(ob.hasBalancedParentheses(")((()())(()))())"));

}

}

8 0
3 years ago
To create a public key signature, you would use the ______ key.
olya-2409 [2.1K]

Answer:

To create a public key signature, you would use the <u>_private_</u> key.

Explanation:

To create a public key signature, a  private key is essential to enable authorization.

A private key uses one key to make data unreadable by intruders and for the data to be accessed the same key would be needed to do so.

The login details and some important credentials to access user data contains both the user's public key data and private key data. Both private key and public key are two keys that work together to accomplish security goals.

The public key uses different keys to make data readable and unreadable.

The public key is important to verify authorization to access encrypted data by making sure the access authorization came from someone who has the private key. In other words, it's a system put in place to cross-check the holder of the private key by providing the public key of the encrypted data that needed to be accessed. Though, it depends on the key used to encrypt the data as data encrypted with a public key would require a private key for the data to be readable.

4 0
3 years ago
Kai recently graduated from college with a dual degree—a Bachelor’s in Game Design and Development and a Bachelor’s in Music. Th
irakobra [83]
Audio designer

Audio designers plan , sound effects, music and pretty much anything that has to do with sound in a video game
6 0
2 years ago
Other questions:
  • Write a program that calculates an adult's fat-burning heart rate, which is 70% of 220 minus the person's age. Complete fat_burn
    10·1 answer
  • Why is it difficult to enforce laws against intellectual theft?
    10·1 answer
  • What should a password policy contain to reduce a hackers ability to crack the passwords?
    10·1 answer
  • Which diagram is used as a popular technique for investigating causes and effects? 1. Cause and effect 2. Fishbone/lshikawa 3. R
    13·1 answer
  • What is the purpose of a primary key?
    5·1 answer
  • I prefer a job where I am praise for good performance or I am accountable for results
    13·1 answer
  • What is one major difference between the roles of film directors and theater directors? A. A theater director is involved in sel
    14·1 answer
  • The function of while loop is
    14·1 answer
  • Explain the concept of conditional formatting​
    9·1 answer
  • A. Get a value for x from the user.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!