Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions