Aide python

Fermé
jere6342 Messages postés 13 Date d'inscription vendredi 21 novembre 2008 Statut Membre Dernière intervention 5 avril 2009 - 4 déc. 2008 à 14:15
fiddy Messages postés 11069 Date d'inscription samedi 5 mai 2007 Statut Contributeur Dernière intervention 23 avril 2022 - 4 déc. 2008 à 15:14
Bonjour,

Est-ce que quelqu'un sait comment on tape les fonctions: arccos,cos,sin,arcsin sur python?
merci

2 réponses

fiddy Messages postés 11069 Date d'inscription samedi 5 mai 2007 Statut Contributeur Dernière intervention 23 avril 2022 1 844
4 déc. 2008 à 14:34
Salut,
Il faut inclure la bibliothèque math :
 from math import *

Et après tu utilises cos et cie. Attention, c'est acos et non arccos sous python ;)
Cdlt
0
jere6342 Messages postés 13 Date d'inscription vendredi 21 novembre 2008 Statut Membre Dernière intervention 5 avril 2009
4 déc. 2008 à 15:07
bonjour,
comment fait on pour effectuer une puissance sur python? car ^ sa marche pas!!
0
fiddy Messages postés 11069 Date d'inscription samedi 5 mai 2007 Statut Contributeur Dernière intervention 23 avril 2022 1 844
4 déc. 2008 à 15:14
^ marche très bien pour le XOR.
En python pour les puissances, on utilise **
Cdlt
0