Question
Using Python Only Below are the 4-different versions of functions. It is always safe to assume that if return type is not given, it defaults
Using Python Only
Below are the 4-different versions of functions. It is always safe to assume that if return type is not given, it defaults to no return type for that function. Write functions and their invocations (function calls) in main function to invoke the functions code.
Write a function avg_num that take two parameters, calculate their average and return average.
Write a function print_str that take one parameter, and print that parameter.
Write a function my_num that takes no parameters, and returns your favorite number.
Write a function hello_msg that takes no parameters, and prints "hello world".
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started