Random number generator that generates random numbers between 1 and 6

Karthika A
Guvi
Published in
1 min readDec 16, 2019

(simulates a dice).

randint()

randint() is an inbuilt function of the random module in Python3. The random module gives access to various useful functions and one of them being able to generate random numbers, which is randint().

Syntax :

randint(start, end)

Parameters :

(start, end) : Both of them must be integer type values.

Returns :

A random integer within the given range as parameters

Random number generator that generates random numbers between 1 and 6

import randomprint(random.randint(1, 6))#Integer from 1 to 6, endpoints included

--

--