Communauté Eggdrop
[New] Nouvelle balise - Version imprimable

+- Communauté Eggdrop (https://forum.eggdrop.fr)
+-- Forum : Le site (https://forum.eggdrop.fr/forumdisplay.php?fid=7)
+--- Forum : Annonces (https://forum.eggdrop.fr/forumdisplay.php?fid=2)
+--- Sujet : [New] Nouvelle balise (/showthread.php?tid=1788)



Nouvelle balise - CrazyCat - 08/04/2024

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))