Question: Write a python program which performs the following tasks: 1) define the calculate function which has one parameter num. It calls the math module's sqrt
Write a python program which performs the following tasks:
1) define the calculate function which has one parameter num. It calls the math module's sqrt function to calculate the square root value of the parameter num, then it returns the result.
2) define the main function which firstly calls the random module's randint function to generate a random integer number between 10 and 99(inclusive). Then, it calls the calculate function and pass over the generated integer number as argument. The returned value should be printed out in the main function.
3) Execute the program by calling the main function.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
