Answer: Data from multiple workbooks can be combined in a single step.
Explanation:
The Subtotal command allows the creation of groups automatically and common functions such as COUNT, SUM, and AVERAGE are used in the summarizing of data.
An advantage of using the Subtotal dialog box is that data from multiple workbooks can be combined in a single step. Therefore, the correct option is B.
I would believe it would be A. Slide Show Button
Answer:
{"double", "char", "char", "double"} will be stored in word.
Explanation:
Given the word is an array of four strings, {"algorithm", "boolean", "char", "double"}. Hence, the length of the word array is 4.
The for-loop will only run for two iterations due to i < word.length/2, with i = 0 (first loop) and i = 1 (second loop).
In the first loop,
- word[word.length - 1 - i] = word[4 - 1 - 0] = word[3] = "double"
- Hence, the string "double" will be assigned to word[0] and overwrite "algorithm"
In the second loop,
- word[word.length - 1 - i] = word[4 - 1 - 1] = word[2] = "char"
- Hence, the string "char" will be assigned to word[1] and overwrite "boolean"
At last, the word array will hold {"double", "char", "char", "double"}
Answer:
def compute_pay(number_of_hours, rate_of_pay):
if number_of_hours > 40:
pay_for_week = (40*rate_of_pay)+((number_of_hours-40)*\
(rate_of_pay+rate_of_pay*0.5))
else:
pay_for_week = number_of_hours*rate_of_pay
if pay_for_week >= 375:
print("Paying %d by direct deposit" % pay_for_week)
else:
print("Paying %d by mailed check" % pay_for_week)
Explanation:
- We define the computer pay function that receives the number of hours worked in a week and the rate of pay
- From the test cases we deduce that if a worker works more than 40 hours a week an extra payment is given, you can calculated it as follow: (40 * rate_of_pay) + ((number_of_hours - 40) * (rate_of_pay + rate_of_pay * 0.5))
- If a worker works less than 40 hours the payment is calculated as follow: pay_for_week = number_of_hours * rate_of_pay
- If the pay for week is equal or greater than 375 we print a payment by direct deposit otherwise we print payment by mailed check