Lab Exercises 5.3
- Write a Python function called calculate_power that takes in two arguments, base and exponent. If no exponent is provided, the function should calculate the square of the base. Test your function by calling it with different values for base and exponent. Print the results.
- Write a Python function called print_person_details that takes in three arguments: name, age, and country. The function should print the person’s details in the following format: “Name: [name], Age: [age], Country: [country]”. Test your function by calling it with different values for the arguments.
- Write a recursive function called fibonacci() that prints a list of the fibonacci numbers.
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 and so on.
Each number is equal ...