-3
import random

class Dice:
  def roll(self):
    First = random.randit(1, 6)
    Second = random.randint(1, 6)
    return First, second


dice1= Dice()
dice1.roll()
Sayse
  • 42,633
  • 14
  • 77
  • 146

1 Answers1

0

You haven't given a good description of what you are trying to do here, but based on my assumptions you might want something like this:

import random

class Player:
  # initialize a player class with name of player
  def __init__(self, name):
    this.name = name

  # Roll dice method
  def roll(self):
    First = random.randit(1, 6)
    Second = random.randint(1, 6)
    return First, second


player1 = Player("Alice")
player1.roll()
player2 = Player("John")
player2.roll()
Tom Walsh
  • 119
  • 2
  • 12