Answers for "random variable python"

8

python make a random number

# 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)
Posted by: Guest on February-26-2020
11

python random number

from random import randint

print(randint(1,3))

#Possible Outputs#
#1
#2
#3
Posted by: Guest on March-07-2020
1

how to make a random variable in python

import random
value = randint(1,10)
#1 and 10 represent the range for your random value
print(value)
Posted by: Guest on March-25-2020
8

random numbers python

import random
a = (random.randint(bottom value, top value)
Posted by: Guest on July-09-2020
4

random in python

print(random.randint(1, 100))
print(random.random())
Posted by: Guest on June-05-2020

Code answers related to "random variable python"

Python Answers by Framework

Browse Popular Code Answers by Language