Python Assignment 2
Python Assignment 2
Question 1: Write a function called is_even that takes an integer as a parameter and returns True if
the number is even, and False if it’s odd.
Question 2: Create a function called calculate_bmi that takes two parameters: weight (in kg) and
height (in meters), and returns the BMI (Body Mass Index) using the formula:
Question 3: Write a function called fibonacci that takes a single integer n and returns a list of the first
n numbers in the Fibonacci sequence.
Question 4: Write a function called factorial that takes an integer n and returns the factorial of that
number using recursion.
Question 5: Write a function find_max_min that takes a list of numbers as input and returns a tuple
containing the maximum and minimum numbers in the list.