I’m working on a Python exercise and need support.

1. Write a Python program (using a loop) that prints out all the multiples of 3 down from 40 to 0 in descending order (i.e., 39, 36, 33, …, 3)

2. Write a Python program (using a nested loop) to print out the following pattern (there is a space between the numbers next to each other).

1

2 1

3 2 1

4 3 2 1

5 4 3 2 1

3. Write a Python **function** to find the Max of three numbers.

4. Write a Python **function** to calculate the factorial of a number (a non-negative integer). The function accepts the number as an argument.

Example:

Please enter a non-negative integer: 5

The factorial of 5 is 120

5. The Fibonacci sequence is a sequence of numbers that starts with 1, followed by 1 again. Every next number is the sum of the two previous numbers. I.e., the sequence starts with 1, 1, 2, 3, 5, 8, 13, 21,… Write a program that calculates and prints the Fibonacci sequence until the numbers get higher than 1000.