Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python zufallszahl

### random number between 0 and 0.99999
print(random.random())

### random number between 5 and 8
print(random.uniform(5,8))

### random number with normal distribution (bell curve)
## random.normalvariate(standard deviation sigma)
print(random.normalvariate(5, 0.1))

### simulate dice roll
print(random.randint(1,6))

### random item from list
number = ['one', 'two', 'three']
print(random.choice(number))
Comment

PREVIOUS NEXT
Code Example
Python :: print pandas version python 
Python :: keras.layers.MaxPool2D 
Python :: python: calculate number of days from today date in a data frame 
Python :: python datetime to seconds 
Python :: keras tuner 
Python :: python beginner practice problems 
Python :: float to percentage python 
Python :: Python Crash Course, 2nd Edition: A Hands-On, Project-Based Introduction to Programming 
Python :: vault python client 
Python :: qradiobutton example 
Python :: create close python program in puthon 
Python :: Python Creating string from a timestamp 
Python :: make blinking text python1 
Python :: Python program to check Co-Prime Number 
Python :: Write a Python function to check whether a number is in a given range. 
Python :: how to check if a list is a subset of another list 
Python :: Make a Basic Face Detection Algorithm in Python Using OpenCV and Haar Cascades 
Python :: fixed precision float python 
Python :: how to download nltk in python 
Python :: replace value in dataframe 
Python :: pickling and unpickling in python 
Python :: deleting dataframe row in pandas based on column value 
Python :: django login_required decorator 
Python :: pandas select columns by index list 
Python :: get time format python2 hours minutes seconds milliseconds 
Python :: create new dataframe from existing dataframe pandas 
Python :: title() function in python 
Python :: django objects.create() 
Python :: python printing to a file 
Python :: circumference of circle 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =