Python Codeschnipsel

Codeschnipsel

  • Random
    import random
    # random erzeugt eine Zufallszahl zwisachen 0 und 1
    _x = random.random()
    print(_x)
    # randint(1,6) erzeugt eine Zufallszahl zwischen 1 und 6
    _y = random.randint(1,6)
    print(_y)

  •    

back to python