def calculate_pay(total_worked_hours, rate_per_hour):
if total_worked_hours > 40:
return (40 * rate_per_hour) + ((total_worked_hours - 40) * 2 * rate_per_hour)
else:
return total_worked_hours * rate_per_hour
Explanation:
The function calculate_pay is designed with two parameters.
- Within the function, check if total_worked_hours exceed 40, then calculate the pay according to the overtime rules defined in the formula.
- If not, simply return the pay by multiplying total_worked_hours with rate_per_hour.
The response and explanation for this inquiry can be found in the attached document.
Response:
C. Utilizing public-key encryption for data transfer
Reasoning:
Only encryption offers a secure method for communication.