A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing


  • 5 years ago

could someone help me with:a function askForcard() which takes a card and a hand and return a tuple where first part of the tuple is a Boolean value if the cardvalue is found in the hand. For example, if we are asking our opponent for a ‘J’ and the opponents hand is [('H', 'A'), ('D', 'J')] we are retuned tuple where first part is a boolean value indicating if the card is present and second part returns the position of the card in the opponents hand, if the card is not there just return 0 for position.

  • This Question is Closed
  1. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    check out: http://www.greenteapress.com/thinkpython/thinkCSpy/html/chap15.html it implements a card game (old maid) while teaching about classes (chapter 16 too).... it might give you some ideas.

  2. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...


  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.