Question: Functions Exercise 1 in Python Problem Write a function called avg that takes two parameters. Return the average of these two parameters. If the parameters

Functions Exercise 1 in Python
Problem
Write a function called avg that takes two parameters. Return the average of these two parameters. If the parameters are not numbers, return the string, Please use two numbers as parameters.
Expected Output
If the function call is avg(10,25), then the function would return 17.5
If the function call is avg(10, "cat"), then the function would return Please use two numbers as parameters

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 Programming Questions!