Python liczby losowej
# generate random integer values
from random import randint
value = randint(0, 10)
print(value)
Successful Stoat
# generate random integer values
from random import randint
value = randint(0, 10)
print(value)
import random
print(random.randint(10,100))
this will output somthing between 10 and 100
# imports random
import random
# randint generates a random integar between the first parameter and the second
print(random.randint(1, 100))
from random import randint
print(randint(1, 10))
# prints a random integer from 1 to 10
# generate random integer values
from random import seed
from random import randint
# seed random number generator
seed(1)
# generate some integers
for _ in range(10):
value = randint(0, 10)
print(value)
from random import randint
print(randint(1, 10))