import random
for i in range(20):
print(random.randint(1, 10))
from random import *
for i in range(20):
print(randint(1, 10))
import math
phi = (1 + math.sqrt(5)) / 2
print(phi)
print(math.pi)
from math import *
phi = (1 + sqrt(5)) / 2
print(phi)
print(pi)
import sys
while True:
print('Taper "exit" pour sortir.')
reponse = input()
if reponse == 'exit':
sys.exit()
print('Vous avez tapé ' + reponse + '.')
from sys import *
while True:
print('Taper "exit" pour sortir.')
reponse = input()
if reponse == 'exit':
exit()
print('Vous avez tapé ' + reponse + '.')
Dans ce cours nous avons vu :
random, math et sys