# Class variables and instance variables

Provide an example of class variables vs instance variables. Use a realistic use case.


```python

```

# Class design

Write two classes, one to represent a rectangle, the second a square. They must have an appropriate constructor (width, height for the rectangle, width for the square) and area and perimeter calculation methods. Code duplication must be avoided as much as possible. Please explain your implementation choices.


```python

```

# Recursivity (or not)

Here is the pseudo code of a function that is defined recursively:

$$
\begin{align}
f(0) & = 1 \\
f(1) & = 3 \\
f(n) & = 3 * f(n - 1) - f(n - 2) \\
\end{align}
$$

Provide an implementation for $f$. Bonus points for a non recursive implementation.


```python

```

e1ce5086ce3dbccbf58224cfd0e38efa6a1baa22
ipynb
Jupyter Notebook
OO Programming and Recurrence.ipynb
aparakian/interview
d8498913e83a217557c95c5de85d0ed4085f4286
MIT
OO Programming and Recurrence.ipynb
aparakian/interview
d8498913e83a217557c95c5de85d0ed4085f4286
MIT
OO Programming and Recurrence.ipynb
aparakian/interview
d8498913e83a217557c95c5de85d0ed4085f4286
MIT
Qwen/Qwen-72B
1. YES
2. YES

