Answer:
c. Copy the executable file to the user’s computer
Explanation:
When you run a c++ program, an executable file (.exe) is created in the same directory with the source file.
To deploy this program on another system, you need to transfer the executable file from the original system where the program was executed to the new system.
The program will work fine without errors.
However, do not mistake the executable file for the source file. The source file ends in .cpp.
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:
decode( )
Explanation:
We can use the method decode( ) to decode the string using the codec registered for encoding.
There are two parameters
encoding: We can encode with this parameter.
errors: If used to manage the errors.
For example:
String = "this is string example....wow!!!";
String = Str.encode('base64','strict');
If we print these variables we have:
String = b'dGhpcyBpcyBzdHJpbmcgZXhhbXBsZS4uLi53b3chISE='
String = this is string example....wow!!!
Answer:
See Explaination
Explanation:
public class testscope
{
//start of main function
public static void main(String[] args)
{
//varible declration
int i;
int x;
//loop for 10 times
for(i=0; i<10; i++)
{
//initialize value of x to 10
x = 10;
}
//the scope of variable x is visible outside of for loop
System.out.println("The value of x is: "+x);
}
}
See attachment for sample output
nb:
You can clearly see in the output of Java program the value of x is not printed and program return errors. It means the variable x declared inside for loop does not has scope outside the for loop.
Answer:
The Following are the solution to this question:
Explanation:
In Option a:
In the point (i)
is transitive, which means it converts one action to others object because if
indicates
. It's true by definition, that becomes valid. But if
, which implies
. it's a very essential component. If
. They
will also be
.
In point (ii), The value of
is convergent since the
. It means they should be dual a and b constant variable, therefore
could only be valid for the constant variable, that is
.
In Option b:
In this algorithm, the input size value is equal to 1 object, and the value of A is a polynomial-time complexity, which is similar to its outcome that is
. It is the outside there will be a loop(i) for n iterations, that is also encoded inside it, the for loop(j), which would be a loop
. All internal loops operate on a total number of
generations and therefore the final time complexity is
.