Skip to content

Instantly share code, notes, and snippets.

View ZoeChiri's full-sized avatar
🏠
Working from home

Zoe Chirico ZoeChiri

🏠
Working from home
View GitHub Profile
import random
import time
suits = ['♣','♦','♥','♠']
cards = ['K', 'Q', 'J', '10', '9', '8', '7', '6', '5', '4', '3', '2', 'A']
values = {'K':10, 'Q':10, 'J':10, '10':10, '9':9, '8':8, '7':7, '6':6, '5':5, '4':4, '3':3, '2':2, 'A':1}
def deal():
suit = random.choice(suits)
import random
import time
import random
class Card:
def __init__(self, r, s):
self.rank = r
self.suit = s
import random
def checkValue(guess, mysteryNumber, count):
if guess < 1 or guess > 10:
return count, 'Invalid guess'
if guess == mysteryNumber:
return count, 'Win'
if guess < mysteryNumber:
return count, 'Too Low'
import random
numberOfGuesses = 0;
mysteryNumber = random.randint(1, 10)
while numberOfGuesses < 3:
guessUser1 = int(input("User1: Guess a number between 1-10: "))
if guessUser1 < 0 or guessUser1 > 10: