Question: Data programming: PYTHON Write a program and create a function called isDivisible that takes two numbers as parameters, determines the first number is divisible by

Data programming: PYTHON

Write a program and create a function called isDivisible that takes two numbers as parameters, determines the first number is divisible by the second number or not. The function should print the results. The program output is shown below.

Input:

26 4

30 6

Output:

a) 26 is not divisile by 4.

b) 30 is divisible by 6.

Write a program and create a function called powRand that generates two random integer numbers(base and exponent) which are between 1 and 10. The function calculates the base power exponent using math.pow function and returns the result. The program output is shown below.

Output:

a) 5 power 9 is 1953125

b) 6 power 4 is 1296

Write a program and create a function called calc. The function takes three numbers as parameters, calculates the following formula: square root of number1^1+number2^2+number3^3, round the result to 2 decimal places, and returns the result. The output is shown below.

Input:

12 5 2

2 6 3

Output:

a) 6.71

b) 8.06

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!