Question: A Python script file, function.py, contains only the following lines of Python code. def my_func(msg): print(Here is the message + msg) When run, the
A Python script file, function.py, contains only the following lines of Python code.
def my_func(msg): print("Here is the message " + msg) When run, the script prints nothing to the screen and exits. Why?
| a. | The defined function is not called, .so the print function is never called. | |
| b. | Function definitions are ignored by Python, like comments. | |
| c. | The script contains a syntax error. | |
| d. | The function is not defined correctly. |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
