Do you go to BASIS?
Sorry I don't have an answer for you, but we have the same assignment in our AP Comp sci class.
Just wondering.
Answer:
False
Explanation:
NPV stands for Net Present Value, it is an important term in finance as it used to determine the value of money or investment based on a series of cashflows and specified discount rate. Excel provides a functions which aids easy calculation of the Net Present value of money or investment using the NPV formula. The syntax forbthe NPV formula is :
=NPV(rate,value 1, [value 2],...)
This formular requires only tow key parameters ; the discount rate, which comes first and the cashflows, which is designated in the syntax as values ; the cashflows is usually placed in a range of cells in excel and the cell range is inputed in the formular. Hence, the number of payments and future value aren't part of the NPV syntax.
Answer:
Option d num = 50, min = 50, max = 50
Explanation:
Given the code segment:
- boolean isBigger;
- boolean isSmaller;
- boolean inRange;
- if (num < max)
- {
- isSmaller = true;
- }
- else {
- isSmaller = false;
- }
-
- if (num > min)
- {
- isBigger = true;
- }
- else {
- isBigger = false;
- }
-
- if (isBigger == isSmaller) {
- inRange = true;
- } else {
- inRange = false;
- }
If we have num = 50, min = 50 , max = 50, the condition num < max will be evaluated to false and therefore isSmaller is set to false.
The condition num > min will be evaluated to false as well and therefore isBigger is set to false.
Since isSmaller and isBigger are both false and therefore isBigger == isSmaller will be evaluated to true and set the inRange = true. This has violated the statement that if the integer value num is greater than min value and less than max value, then only set inRange to true. This is because num = 50 is neither greater than min nor less than max, it is supposedly not in range according to the original intention of the code design.