We want to construct an algorithm with specification: Input:…

We want to construct an algorithm with specification: Input: n,r are integers with n, r >= 0 Output: returns p with p = n times r. For that purpose, we use a loop with invariant: p = (n – k) times r. Fill in the missing spots in the code below such that the invariant is established by the initial assignments, is maintained by the loop body, and such that the invariant implies the postcondition at loop exit. p

Exam Guidelines and Honor Code Reminder Permitted and Prohib…

Exam Guidelines and Honor Code Reminder Permitted and Prohibited Devices Only your laptop is allowed during the exam. All other electronic devices—including smartwatches, headphones, and cell phones—must be powered off and kept away from your workspace. Possession of any unauthorized device during the exam will be treated as an Honor Code violation. Exam Conduct No talking or looking away from your screen during the exam. You are permitted to use one cheat sheet with syntax-related notes. Accessing unauthorized resources (such as non-exam web pages, other parts of Codio or Canvas, or using communication tools) is strictly prohibited and will be treated as an Honor Code violation. Questions Be sure to click “Check it” after completing each coding question. At the end of the exam, you must click “Mark as Complete” to ensure the exam is properly submitted before stopping the Honorlock. Responsibility for passing test cases: Your grade for the programming questions will be based on the number of test cases your code successfully passes. Consequences for Honor Code Violations Cheating, including using AI, external tools, or outside assistance, will result in the following penalties: A failing grade (E) for the course. Prohibition from dropping the course.     As a student, I understand that I must adhere to these guidelines throughout the exam. Any violation of the Honor Code will result in severe consequences as outlined above. I will complete the exam with honesty and integrity.

Acme Company manufactures three products, Products P, Q, and…

Acme Company manufactures three products, Products P, Q, and R. To apply manufacturing overhead to jobs, Acme uses an activity-based costing system that includes three cost pools (and cost drivers): Assembly (direct labor hours), Machine Setups (number of setups), and Material Handling (number of parts). Here are the estimates for the upcoming year: What percentage of the costs in the Material Handling cost pool will be allocated to Product R? Round to the nearest whole number and do not enter a percent sign or a decimal point (e.g., enter 89, not 89.0% or 0.89).