├── README.md └── poker_game.py /README.md: -------------------------------------------------------------------------------- 1 | 2 | # 🃏 GitHub Projects for MupocllaB 3 | 4 | ## 1️⃣ Poker Hand Evaluator 5 | - Python-скрипт для визначення покерних комбінацій. 6 | 7 | ## 2️⃣ Crypto Price Tracker 8 | - Трекер цін на Bitcoin та Ethereum через CoinGecko API. 9 | 10 | ## 3️⃣ Simple Poker Game 11 | - Гра у покер проти бота з мінімалістичним інтерфейсом. 12 | 13 | ## 🚀 Запуск: 14 | ```bash 15 | python3 poker_hand_evaluator.py 16 | python3 crypto_tracker.py 17 | python3 poker_game.py 18 | ``` 19 | -------------------------------------------------------------------------------- /poker_game.py: -------------------------------------------------------------------------------- 1 | 2 | import random 3 | 4 | RANKS = "23456789TJQKA" 5 | SUITS = "CDHS" 6 | 7 | deck = [r + s for r in RANKS for s in SUITS] 8 | random.shuffle(deck) 9 | 10 | your_hand = deck[:5] 11 | dealer_hand = deck[5:10] 12 | 13 | print("Your hand:", your_hand) 14 | print("Dealer's hand:", dealer_hand) 15 | 16 | your_score = sum(RANKS.index(card[0]) for card in your_hand) 17 | dealer_score = sum(RANKS.index(card[0]) for card in dealer_hand) 18 | 19 | if your_score > dealer_score: 20 | print("🎉 Ви виграли!") 21 | elif your_score < dealer_score: 22 | print("😢 Ви програли!") 23 | else: 24 | print("🤝 Нічия!") 25 | --------------------------------------------------------------------------------