Question: answer question 4 and 5 question 5 Q4. A) Write a python function that accepts a variable n and returns numbers from 1 to n.

answer question 4 and 5
answer question 4 and 5 question 5 Q4. A) Write a python
function that accepts a variable n and returns numbers from 1 to
question 5

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. } 1. Say you use working hours as a parameter, and you are paid N35000 per hour it. When you do well in a day, your boss will be very happy to give a bonus of N5000 added to your salary ini. Detine a "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 wager 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 cared 05. A) A year is a leap year if it is divisible by 4. except that years divisible by 100 are not leap years unless they are also divisible by 400. Write a function that take year as a parameter and returns whether it is a leap year or not E) Write a recursive function (in python that returns the factorial of any integer 26. A) Write a script to determine the number of terms required for the sum of the series 52 28. k = 1.2.3 ... to exceed 10097 What the sum for this many terms? us B) Write a function to calculate the area of a circle. If the radius is less than or equal zero, the user should see a statement that says. Sorry this radius is invalid" C) i Give 5 differences between Matlab and Python B) Write a Python script to check whether a given key already exists in a dictionary fi. Based on your personal experience, which of the two programming languages is mors relevant to your field of study, why do you think so? and how is it relevant? D) Give three big name companies that use the two programming languages C) Write a Python script to generate and print a dictionary that contains a number (between land n) in the form (x,xx) E) Give 5 similarities of Matlab and python programming languages D) Access the value of key, 'history' sampleDictionary - "class: student": "name":"Eunice "Marks "physics": 70, "history" 80

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!