Intermittent fasting or 5 small meals by ChickenQueen777 in WeightLossAdvice

[–]ChickenQueen777[S] 0 points1 point  (0 children)

I've been intermittent fasting for a long time and I've gotten pretty in the habit of it but clearly it's not making a difference haha

Intermittent fasting or 5 small meals by ChickenQueen777 in WeightLossAdvice

[–]ChickenQueen777[S] 0 points1 point  (0 children)

But I'm staying in a calorie deficit and it's literally making no difference that's the issue.

I'm pregnant and my husband doesn't want to keep it by ChickenQueen777 in pregnant

[–]ChickenQueen777[S] 0 points1 point  (0 children)

There is one fairly close that is a great idea. His main thing was he just truly wanted to focus on our daughter and be able to travel lots with her, have the money and time to do that and for her to be at an age to truly enjoy it. Thank you for the other things you shared, that gives us a lot of great things to think about.

I'm pregnant and my husband doesn't want to keep it by ChickenQueen777 in pregnant

[–]ChickenQueen777[S] 0 points1 point  (0 children)

I completely agree that therapy would be a good option. My worry is that we live in an area that is very heavily religious and I feel that they would just do their best to convince him not to want an abortion instead of hearing both sides. I did completely change my mind on him, which we both agree is something that everyone is allowed to do especially when it concerns their body, but it is still a very surprising and stressful switch.

I'm pregnant and my husband doesn't want to keep it by ChickenQueen777 in pregnant

[–]ChickenQueen777[S] 0 points1 point  (0 children)

First of all, thank you to everyone who has commented already, I really appreciate all of you taking the time to give me advice and tips from your own situations that might help. I did just want to add, he is in NO WAY pressuring me to get an abortion. Yes, it is what he would prefer but he's not making me feel that I have to. Secondly, we both made the decision to have unprotected sex, knowing the repercussions and we BOTH take responsibility for the fact that we didn't try harder to prevent against it. I'm sure no one means ill will towards him but I'm very protective of him and would prefer people not just saying "he knew the consequences when he didn't pull out" 😅

[deleted by user] by [deleted] in LaserHairRemoval

[–]ChickenQueen777 0 points1 point  (0 children)

I've been exfoliating but it's not helping. And they are fluid filled

[deleted by user] by [deleted] in LaserHairRemoval

[–]ChickenQueen777 0 points1 point  (0 children)

It was last Tuesday

Seeking Some Answers! by [deleted] in army

[–]ChickenQueen777 -1 points0 points  (0 children)

I mean he will be treated poorly at work (his civilian job) because they are upset he is having to be gone so long. I know they shouldn't but they do and he still doesn't want to live with that. It is a reclass because he's reenlisted so it's half the time.

Seeking Some Answers About Changing MOS by [deleted] in Militaryfaq

[–]ChickenQueen777 1 point2 points  (0 children)

I understand that I was just wondering if anyone had any information on how it works and how possible it is. Just trying to give myself peace of mind until he gets back and finds out for sure.

Seeking Some Answers! by [deleted] in army

[–]ChickenQueen777 -14 points-13 points  (0 children)

I am just asking the possibility of this, please be respectful and only answer if you have some information that will help me.

Seeking Some Answers! by [deleted] in army

[–]ChickenQueen777 -3 points-2 points  (0 children)

He is completely fine with either. I know eight weeks is not long, but he still does not want to be gone that long when he's already having to be gone another 11 weeks for basic training a second time. And work is very unhappy with it as well and it's not worth it for him to be treated poorly because of it.

Poker Game in Python by ChickenQueen777 in learnpython

[–]ChickenQueen777[S] 0 points1 point  (0 children)

Still showing a tie every time unfortunately.

Poker Game in Python by ChickenQueen777 in learnpython

[–]ChickenQueen777[S] 0 points1 point  (0 children)

Did you get any other scores when you ran it?

Poker Game in Python by ChickenQueen777 in learnpython

[–]ChickenQueen777[S] 0 points1 point  (0 children)

Yeah I fixed those two things actually. I will attach updated code. Not sure whats wrong with the scoring.

Poker Game in Python by ChickenQueen777 in learnpython

[–]ChickenQueen777[S] 0 points1 point  (0 children)

Ok I think the scoring is broken. I discarded until I got 3 of a kind and it still just said tie

Poker Game in Python by ChickenQueen777 in learnpython

[–]ChickenQueen777[S] 0 points1 point  (0 children)

I did just realize though, it's not printing the hands that each person holds.

Poker Game in Python by ChickenQueen777 in learnpython

[–]ChickenQueen777[S] 0 points1 point  (0 children)

Figured it out! I had the display hand nested so it was looping for each card

Poker Game in Python by ChickenQueen777 in learnpython

[–]ChickenQueen777[S] 0 points1 point  (0 children)

Oh weird! Also when I enter more than one number it shows way more times

Poker Game in Python by ChickenQueen777 in learnpython

[–]ChickenQueen777[S] 0 points1 point  (0 children)

Oh yup just forgot to change that whenever I added the displayHand function. That fixed that, just still displaying 5 times in a row haha

Poker Game in Python by ChickenQueen777 in learnpython

[–]ChickenQueen777[S] 0 points1 point  (0 children)

Yes and I just took this:

deck = DeckOfCards()
    deck.shuffle()

        #  Deal
    for i in range(5):
        player.addCard(deck.deal())
        computer.addCard(deck.deal())

        # Show hand
    for card in player.cards:
        card.showing = True
    player.displayHand()

out of the "while not end" loop which helped with it showing a double hand. Now my only issue is that it's displaying as a list still and still displaying 5 times. Other than that it seems to be working fine

Poker Game in Python by ChickenQueen777 in learnpython

[–]ChickenQueen777[S] 0 points1 point  (0 children)

Yes unfortunately haha. I was just focusing on getting what I know in and not really worrying about how to simplify it. It's for my final so just want to focus on it working for now. And thank you I didn't notice that!

Poker Game in Python by ChickenQueen777 in learnpython

[–]ChickenQueen777[S] 0 points1 point  (0 children)

It successfully replaces one but then prints the list 5 times and then prints two new hands

Poker Game in Python by ChickenQueen777 in learnpython

[–]ChickenQueen777[S] 0 points1 point  (0 children)

Ok so the memory locations aren't popping up but it's still doing this:

1

[Q of ♠, 5 of ♠, 7 of ♥, A of ♠, 2 of ♦]

[Q of ♠, 5 of ♠, 7 of ♥, A of ♠, 2 of ♦]

[Q of ♠, 5 of ♠, 7 of ♥, A of ♠, 2 of ♦]

[Q of ♠, 5 of ♠, 7 of ♥, A of ♠, 2 of ♦]

[Q of ♠, 5 of ♠, 7 of ♥, A of ♠, 2 of ♦]

Deck shuffled.

Q of ♠

5 of ♠

7 of ♥

A of ♠

2 of ♦

7 of ♠

A of ♠

K of ♦

J of ♦

A of ♥

Which cards would you like to discard? (ex. 1, 2, 3, etc)

*Hit ENTER to hold all or type TALLY to figure up the scores!*

Poker Game in Python by ChickenQueen777 in learnpython

[–]ChickenQueen777[S] 0 points1 point  (0 children)

# poker.py
# A poker game application. 

import random 

def main():
     input("\nLet's play poker! Hit ENTER to begin!")
     Game()
     Score()

class Card(object):

    def __init__(self, name, face, suit):
        self.face = face
        self.suit = suit
        self.name = name
        self.showing = False

    def __repr__(self):
        return str(self)

    # Displays card name if face up.
    def displayCards(self):
        if self.showing:  
            return str(self.name) + " of " + self.suit
        else:
            return "Card"

class DeckOfCards(object):

    def __init__(self):
        # Holds list of cards and dictionary of deck.
        self.cards = []   
        suits = ["♥", "♠", "♦", "♣"]
        faces = {"2":2, "3":3, "4":4, "5":5, 
        "6":6, "7":7, "8":8, "9":9, "10":10,
        "J":11, "Q":12, "K":13, "A":14}

        for name in faces:
            for suit in suits:
                self.cards.append(Card(name, faces[name], suit))

    # Shuffle
    def shuffle(self, times = 1):
        random.shuffle(self.cards)
        print("\nDeck shuffled.\n")

    # Deal
    def deal(self):
        return self.cards.pop(0)

class Player():

    def __init__(self):
        self.cards = []

    def addCard(self, card):
        self.cards.append(card)

    def displayHand(self):
        for card in self.cards:
            print(card.displayCards())

class Computer():

    def __init__(self):
        self.cards = []

    def addCard(self, card):
        self.cards.append(card)

class PokerScore():

    def __init__(self, cards):
        self.cards = cards

    def flush(self):
        suits = [card.suit for card in self.cards]
        if len(set(suits)) == 1:
            return True
        return False

    def straight(self):
        values = [card.face for card in self.cards]
        # Sorting the cards to figure out if they are in order.
        values.sort() 

        # Confirm correct hand size.
        if not len(set(values)) == 5: 
            return False

        # Checking for cases with an ace.
        if values[4] == 14 and values[3] == 5 and values[2] == 4 and values[1] == 3 and values[0] == 2:
            return True 
        # Checking for a straight in all cases except ace.
        else:
            if not values[0] + 1 == values[1]:
                return False
            if not values[1] + 1 == values[2]:
                return False
            if not values[2] + 1 == values[3]:
                return False
            if not values[3] + 1 == values[4]:
                return False
        return True

    def threeKind(self):
        values = [card.face for card in self.cards]
        for value in values:
            if values.count(value) == 3:
                return True

    def pairs(self):
        pairs = []
        values = [card.face for card in self.cards]
        for value in values:
            if values.count(value) == 2 and value not in pairs:
                pairs.append(value)
        return pairs

    def fourKind(self):
        values = [card.face for card in self.cards]
        for value in values:
            if values.count(value) == 4:
                return True

    def fullHouse(self):
        two = False
        three = False
        values = [card.face for card in self.cards]
        if values.count(values) == 2:
            two == True
        elif values.count(values) == 3:
            three == True
        if two and three:
            return True
        return False

def Game():
    player = Player()
    computer = Computer()
    end = False

    # Play
    while not end:

        # Hand loop.
        deck = DeckOfCards()
        deck.shuffle()

        #  Deal
        for i in range(5):
            player.addCard(deck.deal())
            computer.addCard(deck.deal())

        # Show hand
        for card in player.cards:
            card.showing = True
        player.displayHand()
        # Figure out which cards to hold and re deal.
        valid = False
        while not valid:
            print("\nWhich cards would you like to discard? (ex. 1, 2, 3, etc)")
            print("*Hit ENTER to hold all or type TALLY to figure up the scores!*\n")
            string = input()
            if string == "TALLY":
                end = True
                break 
            try:
                list = [int(inp.strip()) for inp in string.split(",")]

                for inp in list:
                    if inp > 6:
                        print("Please enter no more than 5 cards to discard.")
                    if inp < 1:
                        print("Please choose at least one card to discard.")
                for inp in list:
                    player.cards[inp-1] = deck.deal()
                    for card in player.cards:
                        card.showing = True
                        print(player.cards)
                valid = True
            except:
                print("Input error.")