ython code. Instructions are given within the quotations for each function. 1) def fun_a(cards): """   cards is a list of int numbers ranging between 0 to 12 inclusive.   We use the number to represent the card's rank in a deck of card.   0 is '2', 1 is '3', ...,9 is 'J', 10 is 'Q', 11 is 'K' and 12 is 'A'   This function is to check if there is full house in the cards. If

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.3: Interactive While Loops
Problem 6E: (Conversion) a. Write a C++ program to convert meters to feet. The program should request the...
icon
Related questions
Question

python code. Instructions are given within the quotations for each function.

1) def fun_a(cards):

"""

  cards is a list of int numbers ranging between 0 to 12 inclusive.   We use the number to represent the card's rank in a deck of card.   0 is '2', 1 is '3', ...,9 is 'J', 10 is 'Q', 11 is 'K' and 12 is 'A'   This function is to check if there is full house in the cards. If   we can find five cards of the form x,x,x,y,y where three have the   same rank x and two have the same rank y. If there are more than   one options, choose the highest rank x that has three cards of the   same rank; then choose the highest rank y in the remaining cards that   has two cards of the same rank.   return (x, y) if such a hand exists. otherwise return None.  

 """

return

2) def run():

"""   Implement the run function so that it repeatedly ask the user to   enter an int between 0 to 12 inclusive to form a deck of cards to   be used by fun_a(). The input ends when user enters an int outside   of the range 0 to 12.   Then it calls fun_a() with the list formed and print out the answer.   """

return

if __name__ == "__main__": run()

Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Types of Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning