# coding: utf-8
import random
def fibo(n):
if n < 2 : return n
return fibo(n-1) + fibo(n-2)
print(fibo(9))
print(random.randint(0, 100))
# coding: utf-8
import random
for i in range(10):
print(random.randint(0, 100))
# coding: utf-8
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0, 2, 100)
plt.plot(x, x, label='linear')
plt.plot(x, x**2, label='quadratic')
plt.plot(x, x**3, label='cubic')
plt.xlabel('x label')
plt.ylabel('y label')
plt.title("Simple Plot")
plt.legend()
plt.show()
plt.savefig('/tmp/file') # Pour afficher l'image...
# coding: utf-8
def fibo(n):
if n <= 2:
return n
return fibo(n - 2) + fibo(n - 1)
print(fibo(10))
# coding: utf-8
i = 0
while True:
print(i)
i += 1