Question: Python Language 1. Write a function posNegZero(n) that returns 1 if n is positive, -1 if n is negative, 0 if n is 0. 2.

Python Language

1. Write a function posNegZero(n) that returns 1 if n is positive, -1 if n is negative, 0 if n is 0. 2.

2.Write a function sqrCube(n, m) that returns two values, one is the square of n (i.e. n2), and the other is cube of m (i.e. m3). By default, n =5, m=3. 3.

3. Then, write a main function that: A. Make four calls to posNegZero function with values -5, 0, 6.5, +32 respectively.

B.Makes the following calls: sqrCube() sqrCube(4) sqrCube(3,5) sqrCube(n=4,m=2) sqrCube(n=4,2)

Note: the main function also prints out the function call result if any. (Python)

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!