Let’s check out some exercises that will help understand “Defining Functions” better.
Define a function named f_1 which will print "Hello World!"
Now define the same function f_1 and assign it to variable ans_1. See what happens.
Now define the same f_1 function this time so that it returns a value instead of just printing it..
Now create a function named f_1 which both prints and returns "Hello World!"
Create a function named f_1 which always returns the number: 100 .
Create a function named f_1 which takes an integer as input and then returns it.
Can you define a function that takes a list as input and returns the reverse of that list?
Write a function named f_1 which will ask user for their name and print Hello!, Name
Write 2 functions named f_1 and f_2. First one takes a number as input and returns that number +5, second function takes a number as input and returns first function's result multiplied by 2.