Answer:
investmentAmount = float(input("enter the investment amount: "))
annualInterestRate = float(input("enter the Annual Interest Rate: "))
numYears = int(input("Enter NUmber of Years: "))
monthlyInterestRate = annualInterestRate/12
futureInvestmentValue = investmentAmount * (1 + monthlyInterestRate)*(numYears*12)
print("The Future Investment Value is: ")
print(futureInvestmentValue)
Explanation:
Using python programming language as required, we use the input function to prompt user for inputs for each of the variables.
There is a conversion from the variable annualInterestRate to monthlyInterestRate before the formula for the futureInvestmentValue is applied
Answer:
b. 16
Explanation:
The given PHP code segment consists of 2 statements.
$str="The quick brown fox jumps over the lazy dog";
This defines a variable $str and assigns the given text to it.
echo strpos($str,'fox');
This statement prints the location of 'fox' in the text associated with the variable $str.
Upon execution it will print the value 16 which corresponds to the position of 'fox' in the given sentence.
Answer:
SQL injection is a form of hacking that uses user input fields.
Explanation:
SQL injection is when a piece of code or entire algorithm is input where a program prompts for user input. They can be used to change or access data. To prevent this, a programmer should scrub inputs. Scrubbing data removes slashes and arrows, which or commonly used in code.