Question

What is the value of the variable shipping if cost = 50 and country = "Canada"?...

What is the value of the variable shipping if cost = 50 and country = "Canada"?
if (cost < 50 && country == "Canada")

shipping = 6.00;

if (cost < 100 && cost > 49 && country == "Canada")

shipping = 9.00;

else

shipping = 12.00;
A. 12.00

B. cannot tell since the else clause does not specify the conditions

C. 9.00

D. 6.00

Homework Answers

Answer #1

C.  9.00

Explanation:
-------------
if (cost < 50 && country == "Canada")   50 < 50 && "Canada" == "Canada" = false && true = false
    shipping = 6.00;    // so, this is not executed
if (cost < 100 && cost > 49 && country == "Canada") // 50<100 && 50>49 && "Canada"=="Canada" = true && true && true = true
    shipping = 9.00;    // so, shipping is set to 9.00
else
    shipping = 12.00;
Answer: 9.00
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
In the table below calculate opportunity cost for: Country Computers Sewing Machines Japan   500 900 Canada...
In the table below calculate opportunity cost for: Country Computers Sewing Machines Japan   500 900 Canada 300 480 a. Japan of producing a computer rather than a sewing machine b. Canada of producing a computer rather than a sewing machine c. Japan of producing a sewing machine rather than a computer d. Canada of producing a sewing machine rather than a computer e. Which country has comparative advantage in producing sewing machines? f. Which country has comparative advantage in producing...
Corporation wants to determine its current market value weighted-average cost of capital. The market value of...
Corporation wants to determine its current market value weighted-average cost of capital. The market value of the firm's bonds is $1.5 million and the bond yield is 12.00%. Company has 125,000 shares of common stock outstanding and the current market price is $40 per share. The firm's tax rate is 30% and its beta is 1.2. The U.S. T-bill rate of return is 6.00% and the total market index rate of return is 11.00%. What is Company's market value weighted-average...
I have a p value of .039. What is the chance I make a type one...
I have a p value of .039. What is the chance I make a type one error? Type two? A 0.461; 0.039 B Cannot tell; 0.039 C 0.039; Cannot tell D Cannot tell; Cannot tell
16. Exhibit 22-2 (1) (2) (3) (4) (5) Variable Input Total Variable Cost Total Fixed Cost...
16. Exhibit 22-2 (1) (2) (3) (4) (5) Variable Input Total Variable Cost Total Fixed Cost Output Marginal Cost 1 $30 $100 20 2 $60 $100 50 (A) 3 $90 $100 90 (B) 4 $120 $100 120 (C) 5 $150 $100 140 (D) Refer to Exhibit 22-2. Diminishing marginal returns set in with the addition of which unit of the variable input? a. the first b. the third c. the fourth d. the fifth e. the second
Total revenue; Explicit cost; Implicit cost; Price; Fixed cost; Variable cost; Accounting cost; Economic cost Using...
Total revenue; Explicit cost; Implicit cost; Price; Fixed cost; Variable cost; Accounting cost; Economic cost Using the above concepts, write an equation for accounting profit (5 points) Using the table below answer the questions 8-10 and show your work. Quantity Total Cost Fixed Cost Variable Cost Marginal Cost Average Fixed Cost Average Variable Cost Average Total Cost 0 $50 $50 $0 -- -- -- -- 1 $150 A B C D E F 2 $270 G H I J K...
Biscuit Company sells its product for $50. In addition, it has a variable cost ratio of...
Biscuit Company sells its product for $50. In addition, it has a variable cost ratio of 55 percent and total fixed costs of $6,875. How many units must be sold in order to obtain a before-tax profit of $12,000? a.839 units b.600 units c.240 units d.480 units Biscuit Company sells its product for $50. In addition, it has a variable cost ratio of 45 percent and total fixed costs of $6,875. What is the break-even point in units for Biscuit...
1.....A firm is paying a 4% coupon interest rate for its outstanding bonds. All else constant,...
1.....A firm is paying a 4% coupon interest rate for its outstanding bonds. All else constant, the higher the firm's tax rate: Select one: A. The higher its after-tax cost of debt B. The lower its after-tax cost of debt C. The after-tax cost of debt remains unchanged D. The answer cannot be determined with the information provided 2......Given an optimal capital structure that is 50% debt and 50% common stock, calculate the weighted average cost of capital for stone...
Exhibit 7-3 Variable Input Fixed Input Output Marginal Physical Product of Variable Input Fixed Cost Variable...
Exhibit 7-3 Variable Input Fixed Input Output Marginal Physical Product of Variable Input Fixed Cost Variable Cost Marginal Cost (units) (units) (units) (units) (dollars) (dollars) (dollars) 0 1 0 $50 $ 0 1 1 10 A $50 $ 20 F 2 1 25 B $50 $ 40 G 3 1 45 C $50 $ 60 H 4 1 60 D $50 $ 80 I 5 1 70 E $50 $100 J Refer to Exhibit 7-3. The marginal cost figures in...
26- When economists say that an individual or country has the comparative advantage in the production...
26- When economists say that an individual or country has the comparative advantage in the production of a good, it means that they: A) can produce more of the good than anyone else. B) are the lowest-opportunity-cost producer of the good. C) are the highest-opportunity-cost producer of the good. D) are operating on their production possibilities frontier. 27- A country produces and consumes eight units of sugar cane costing $50 per unit and two iPods that cost $200 each. After...
suppose that a firm's only variable cost is labor. when 100 workers are used, the average...
suppose that a firm's only variable cost is labor. when 100 workers are used, the average product of labor is 60, and the marginal product of the 100th worker is 50. the wage rate is $25 and the total fixed cost is $1000. (show all calculations) A) what is the average variable cost? B) what is the marginal cost? C) what is the average total cost? D) The following are either true or false. indicate which is correct and explain....
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT