Skip to content

Instantly share code, notes, and snippets.

View mminneman1's full-sized avatar

Marc Minneman mminneman1

View GitHub Profile
@mminneman1
mminneman1 / bullsandcows.py
Last active August 29, 2015 14:05
Bulls and Cows
import random
# create 4-digit secret code
secret_code = []
avail_digits = [x for x in range(10)]
for i in range(4):
secret_code.append(avail_digits.pop(random.randint(0,len(avail_digits)-1)))
#collect user input
while True: