Question: Q4. A) Write a python function that accepts a variable n and returns numbers from 1 to n. However, if a number is divisible by

 Q4. A) Write a python function that accepts a variable n

Q4. A) Write a python function that accepts a variable n and returns numbers from 1 to n. However, if a number is divisible by 3, the function should return Computer' instead of the number. If a number is divisible by 5, "Programming should be returned instead. And if the number is divisible by both 3 and 5, Computer Programming' should be returned. B) Define a function called "wage' that calculates your daily wage. a i. Say you use working hours as parameter, and you are paid N35000 per hour. ii. When you do well in a day, your boss will be very happy to give a bonus of N5000 added to your salary. ii. Define "with bonus" function. And as a parameter, you will take again the working hours. But this time, you will allow yourself to return directly the wage with working hours as an output, which would be the value obtained after the wage function has been run, plus the extra N5000 you've earned

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!