8 February 2012 Utilisation des fonctions ‘Math.pi’ et ‘Math.e’ Math import math print math.pi print math.e import math print math.pi print math.e python
8 February 2012 Python: Obtenir le cube d’un nombre Math def cube(x): return x * x * x print 'Cubes:' print cube(12) print cube(5L)def cube(x): return x * x * x print 'Cubes:' print cube(12) print cube(5L) python
8 February 2012 Python: Calculer la puissance d’un nombre Math nbr1=10 nbr2=15L print nbr1 ** 100 print nbr2 ** 100nbr1=10 nbr2=15L print nbr1 ** 100 print nbr2 ** 100 python
8 February 2012 Obtenir la racine carrée d’un nombre Math from math import sqrt for x in range(99, 0, -1): root = sqrt(x) if root == int(roo from math import sqrt for x in range(99, 0, -1): root = sqrt(x) if root == int(roo python