Multiplication

Liste des GroupesRevenir à cl python 
Sujet : Multiplication
De : ram (at) *nospam* zedat.fu-berlin.de (Stefan Ram)
Groupes : comp.lang.python
Date : 01. Apr 2024, 10:40:41
Autres entêtes
Organisation : Stefan Ram
Message-ID : <multiplication-20240401093746@ram.dialup.fu-berlin.de>
    Q: How can I multiply two variables in Python? I tried:
   
a = 2
b = 3
print( ab )

    but it did not work.

    A: No, this cannot work. To multiply, you need the multiplication
    operator. You can import the multiplication operator from "math":

    Code example:

from math import *

a = 2
b = 3
print( a * b )

Date Sujet#  Auteur
1 Apr 24 * Multiplication6Stefan Ram
1 Apr 24 `* Re: Multiplication5Piergiorgio Sartor
1 Apr 24  +- Re: Multiplication1Joel Goldstick
1 Apr 24  +- Re: Multiplication1D'Arcy Cain
1 Apr 24  +- Re: Multiplication1Avi Gross
1 Apr 24  `- Re: Multiplication1dn

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal