SORU
22 EKİM 2010, Cuma


0 ve 9 arasında rastgele bir tamsayı üretir

Nasıl rastgele oluşturabilirsiniztamsayılarnumaraları0<9(uç dahil) python?

yani 0 1 2 3 4 5 6 7 8 9

CEVAP
22 EKİM 2010, Cuma


Deneyin:

from random import randint
print(randint(0,9))

Daha fazla bilgi: https://docs.python.org/3.1/library/random.html#random.randint

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Bigapplemagic

    Bigapplemagi

    22 EYLÜL 2011
  • Hot For Nutrition

    Hot For Nutr

    26 ŞUBAT 2007
  • thenewboston

    thenewboston

    4 ŞUBAT 2008