0

I'm creating a dice game in python:)

I got the number of plays as input like this

no_of players = int(input('Number od players: '))

How can I generate random numbers 1,6 according to the number of players?

kuro
  • 3,214
  • 3
  • 15
  • 31
Hugo pake
  • 7
  • 1
  • If you want `n` (where n is no of players) random numbers, you can look into `random,sample()` https://docs.python.org/3/library/random.html#random.sample – kuro May 19 '22 at 06:39

1 Answers1

0

Sample Random number generator that generates random numbers between 1 and 6

import random

print(random.randint(1, 6))