hi, i am making black jack code, but i am stuck, i have made start, but for reason gettin errors, which i dont seem be able to fix, below is my code wht i started.
the error which i am getting is:
Traceback (most recent call last):
File "C:\Users\imran \Desktop\jack.p y", line 31, in ?
computer.append (random.randint (deck))
TypeError: randint() takes exactly 3 arguments (2 given)
Code:
import random deck = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10,11]*4 player=[] computer=[] #r = random.randint computer.append(random.randint(deck)) player.append(random.randint(deck)) computer.append(random.randint(deck)) print " The computer hand %d " % computer player.append(random.randint(deck)) print " The player hand %d" % player
Traceback (most recent call last):
File "C:\Users\imran \Desktop\jack.p y", line 31, in ?
computer.append (random.randint (deck))
TypeError: randint() takes exactly 3 arguments (2 given)
Comment