In [2]:
print("Hello man")
In [1]:
def fibo(n):
if n == 0:
return 0
elif n == 1:
return 1
return fibo(n-1) + fibo(n-2)
In [2]:
%timeit fibo(20)
Note: Also it's possible to use %%timeit for the whole code block
In [9]:
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
import matplotlib.pyplot as plt
import numpy as np
In [10]:
x = np.linspace(0, 1, 300)
for w in range(2, 6, 2):
plt.plot(x, np.sin(np.pi*x)*np.sin(2*w*np.pi*x))
In [11]:
%pdb
In [ ]:
numbers = "hello"
sum(numbers)