Question
Suppose experience test = 11 and base pay test = 10000. What is the value of result before the line marked Label 10 is executed?
Suppose experience test = 11 and base pay test = 10000. What is the value of result before the line marked Label 10 is executed? 2. Suppose experience test = 4 and base pay test = 10000. What is the value of result before the line marked Label 4 is executed? 3. Suppose experience test = 4 and base pay test = 10000. What is the value of result before the line marked Label 15 is executed?
def company_policy(experience, base_pay): result = 0 if 0 <= experience < 5: if base_pay > 1000: result += 1 # Label 1 if base_pay > 5000: result += 2 # Label 2 elif base_pay > 9000: result += 2 # Label 3 if experience > 3: result += 3 # Label 4 elif 5 <= experience <= 10: if base_pay <= 10000: result += 4 # Label 5 if base_pay > 25000: result += 5 # Label 6 if base_pay > 50000: result += 2 # Label 7 elif experience > 7: result += 6 # Label 8 elif experience > 10: if base_pay < 30000: result += 4 # Label 9 result += 7 # Label 10 if experience > 15: if base_pay > 50000: result += 5 # Label 11 result += 8 # Label 12 else: result += 8 # Label 13 else: result += 1 # Label 14 result += 7 # Label 15 return result # Label 16 # Main part of program starts here. experience_test = 0 base_pay_test = 0 print('Calling company_policy() with experience = ' + str(experience_test) + ' base_pay = ' + str(base_pay_test) + ': '+ str(company_policy(experience_test, base_pay_test)))
4. Suppose experience test = 8 and base pay test = 26000. What is the value of result before the line marked Label 8 is executed? 5. Suppose experience test = 18 and base pay test = 26000. What is the value of result before the line marked Label 13 is executed?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started