Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > fr.comp.lang.python > #3260

Python bloqué

Path csiph.com!news.mixmin.net!border2.nntp.ams1.giganews.com!border1.nntp.ams1.giganews.com!nntp.giganews.com!buffer1.nntp.ams1.giganews.com!buffer2.nntp.ams1.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date Tue, 03 Dec 2019 15:29:05 -0600
Newsgroups fr.comp.lang.python
Subject Python bloqué
X-poster PEAR::Net_NNTP v1.5.2 (stable)
From Jonathannnn <nospam_enzo.mostachetti@gmail.com.invalid>
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding 8bit
Organization !No_Organization!
Message-ID <-ZKdnfFwIp08TnvAnZ2dnUU798zNnZ2d@giganews.com> (permalink)
Date Tue, 03 Dec 2019 15:29:05 -0600
Lines 35
X-Usenet-Provider http://www.giganews.com
X-Trace sv3-jFroULcIZThPNipTOE0LqIAYHLhvlcgT7yxymwirT1ybSRbVtrbZDe/xOR/zS09Kyz9fdSun4P1DqLi!KJDrlO/0xYERRhhdBEPEpLbh8jZKk30jk53YmNY9RsxRb2Ng7Rmt4FeuzQLPtIwUFbcqZidGDw==
X-Complaints-To abuse@giganews.com
X-DMCA-Notifications http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info Otherwise we will be unable to process your complaint properly
X-Postfilter 1.3.40
X-Original-Lines 34
X-Original-Bytes 2206
Xref csiph.com fr.comp.lang.python:3260

Show key headers only | View raw


Bonjour,
Depuis peu je suis sur Python et je reçois le même message d'erreur qui est
"TypeError: 'module' object is not callable". Je suis allé sur d'autre forum
mais je ne comprends pas mon erreur. Voici mon programme :
from random import randint
import random
def parcoursfourmisurtriangle(n):
        a=0
        b=0
        c=0
        randint=random(1,3)
        p=randint(1,3)
        for deplacement in range(n):
                alea=random()
                if(p==1):
                     if(alea<0,75):
                            p=2
                            b=b+1
                     else:
                         p=3
                         c=c+1                  
                elif(p==2):
                      if (alea<0,75):
                            p=3
                            c=c+1
                      else:
                            p=1
                            a=a+1
                elif(p==3):
                      if(alea<0,75):
                            p=1
                            a=a+1
                      else:
                            p=2
                            b=b+1
        return(a/n,b/n,c/n)

Back to fr.comp.lang.python | Previous | NextNext in thread | Find similar


Thread

Python bloqué Jonathannnn <nospam_enzo.mostachetti@gmail.com.invalid> - 2019-12-03 15:29 -0600
  Re: Python bloqué Benoit Izac <use.reply.to@INVALID.ADDRESS> - 2019-12-03 23:16 +0100

csiph-web