Giter VIP home page Giter VIP logo

object-oriented-python-code's People

Contributors

a6a18 avatar irvkalb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

object-oriented-python-code's Issues

get cards from the top or bottom of decks

hi, Thank you for the wonderful python object-oriented book.
But I was a little confused when I tried to practice the code in chapter 1.

We always take cards from the top, not the bottom, Is it better to use pop(0) in code?
when the code run pop(), the pointer is always placed in the last position, The next card will always be NULL;
If i take a card from the top with pop(0), next is the top card, as described in the original book.

Save the next card suit.

You do need to save the nextCardSuite to Current Card Suit, or else you game shows

Next card is: King of Spades
You got it right, it was higher
Your score is: 70

Will the next card be higher or lower than the King of Clubs?  (enter h or l):  

Which when you ask higher or lower you display current suit value

currentCardValue = nextCardValue # don't need current suit

HigherOrLowerProcedural.py has an incorrect comment

Hi, this is about as minor as it gets, but in case it's useful...

The comment in line 11 of HigherOrLowerProcedural.py states that the function getCard returns a random card. This doesn't seem to be true - it returns the first card in the list, or the "top" one.

# Pass in a deck and this function returns a random card from the deck
def getCard(deckListIn):
    thisCard = deckListIn.pop() # pops one off the top of the deck and returns it
    return thisCard

Thanks from a happy reader!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.