Skip to content

Instantly share code, notes, and snippets.

@alhatimym
alhatimym / twenty_one.py
Created December 18, 2025 09:22
I made a Twnty one game, thanks to mr.Ibrahim Adel for teaching me how to do it go look at his course, it is realy good, i learned all of those things with him.
import random
def deal_card(cards):
return random.choice(cards)
def adjust_for_ace(hand):
if sum(hand) > 21 and 11 in hand: