Communauté Eggdrop

Version complète : Nouvelle balise
Vous consultez actuellement la version basse qualité d’un document. Voir la version complète avec le bon formatage.
Hello,

Pour prévoir la potentielle évolution d'eggdrop qui inclurait python, vous pouvez maintenant utiliser la balise [ python ]...[ /python ] (sans les espaces) comme vous utilisez la balise [ tcl ]

Exemple :
python
import math
# Assign values to x and n
x = 4
n = 3
 
# Method 1
power = x ** n
print("%d to the power %d is %d" % (x, n, power))
 
# Method 2
power = pow(x, n)
print("%d to the power %d is %d" % (x, n, power))
 
# Method 3
power = math.pow(2, 6.5)
print("%d to the power %d is %5.2f" % (x, n, power))