Create a function to print Welcome ( without any return data to main body )
Create a function to display sum of two integers, print should be inside the function.
Create a function to display square of 5 ( without any return data to parent script )
Take one user input number and pass it to a function to display the same by adding 10 to its value.
Create a function to return square of 5 to parent function and then display by using print.
Create a function to receive number 5 as parameter and return square of it to main script. Display the return value using print inside main script .
Ask user to enter one number and then use the function to display square of it inside the function without returning any data to calling script.
Ask user to enter one number, pass this number to a function, return the number to main script after adding 10 to the value.
Ask the user to input two numbers and display the sum of it ( without using any function )
Ask the user to input two numbers and display the sum of it inside a function ( without returning any data to main script )
Ask for two user input numbers, pass to a function and then display highest number.
Ask for two user input numbers, pass to a function and then return highest number to main function.
Ask for two user input numbers, pass to a function and then return highest number to main function. Display the highest number inside main function.
Ask the user to input two numbers and return the sum to main script by using a function and then inside the main display the result after multiplying the sum by 2.
Ask user to enter three numbers then pass the value to a function. Add three numbers inside the function and return the result to main function. Inside main function display the result by adding 10 to it.
Enter your car number ( only number part ) , then enter day number starting from 1 to 7 ( day number of the week ). Your program should say you should go out in your car or not. All even day numbers are mean for cars with even numbers and odd car numbers are for odd day numbers.
Declare a variable num1 equal to 5 inside main script. Create one more function my_fun() and display the value of num1 inside it. ( Don’t declare num1 again inside the my_fun() )
Declare a variable num1 equal to 5 inside main() function. Create one function my_fun() and declare variable num1 equal to 100 and display the value of num1 inside it. Check the output.
In above code , add 100 to num1 after declaring inside my_fun() and display the value.
In above code call the function two times in main function and check the value it displays.
How the value will change in above code if you declare num1 as static variable.
Find out the lowest common factor ( LCF ) of two input numbers.
Find out highest common factor ( HCF ) or greatest common factor of two input numbers.
Find the solutions by using recursive functions
User input one positive integer n, Create a function to find sum of all numbers upto n.
Sum = n+(n-1)+(n-2)… +2+1+0
Find the factorial of a input positive number. ( Factorial of a number ( n ) is product of all the integers from 1 to n )
Find out highest common factor ( HCF ) or greatest common factor of two input numbers.