<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Pot odds simply involves using the odds or likelihood of winning when on a drawing hand to decide whether or not to call a bet or a raise.
Ratio method
 1. Calculate the card odds
Step1:  2. Compare with pot odds
Step2:  Percentage Method
 1. Calculate the card equity
Step3:  2. Calculate the pot odds
Step4:  |outs|held                   | $\to$ |desired            |
|
<ASSISTANT_TASK:>
Python Code:
KNOWN = 5
UNKNOWN = 47
def card_odds(outs):
    duds = UNKNOWN - outs
    #return '%d:%d' % (duds, outs)
    return '%d:%d' % (round(duds/outs), 1)
print(card_odds(1))
print(card_odds(6))
print(card_odds(11))
print(card_odds(16))
print(card_odds(21))
print(card_odds(26))
print(card_odds(31))
print(card_odds(36))
Explanation: Pot odds simply involves using the odds or likelihood of winning when on a drawing hand to decide whether or not to call a bet or a raise.
Ratio method
 1. Calculate the card odds
End of explanation
def pot_odds(pot, bet):
    #return '%d:%d' % (pot, bet)
    return '%d:%d' % (round(pot/bet), 1)
print(pot_odds(100,20))
print(pot_odds(100,40))
print(pot_odds(100,60))
print(pot_odds(100,80))
def call_or_fold_rat(outs, pot, bet):
    #return ((UNKNOWN - outs)/outs) > pot/call
    return 'call' if (UNKNOWN - outs)/outs < pot/bet else 'fold'
call_or_fold_rat(9,100,20)
call_or_fold_rat(9,100,50)
Explanation: 2. Compare with pot odds
End of explanation
def card_equity(outs):
    return 2 * outs + 1
card_equity(9)
Explanation: Percentage Method
 1. Calculate the card equity
End of explanation
def pot_equity(pot, bet):
    return round(bet / (pot + bet) * 100)
pot_equity(100,20)
def call_or_fold_pct(outs, pot, bet):
    return 'call' if (2 * outs + 1) > (bet / (pot + bet) * 100) else 'fold'
call_or_fold_pct(9,100,20)
call_or_fold_pct(9,100,50)
Explanation: 2. Calculate the pot odds
End of explanation
def call_or_fold_24(outs, pot, bet):
    return 'call' if (2 * outs) > (bet / (pot + bet) * 100) else 'fold'
call_or_fold_24(9,100,20)
call_or_fold_24(9,100,50)
def stella(outs, pot, bet):
    return 'call' if (2 * outs) > (bet / (pot + bet) * 100) else 'fold'
stella(9,100,20)
Explanation: |outs|held                   | $\to$ |desired            |
|:--:|:----------------------|:------|:------------------|
|  2 | pair                  | $\to$ | trips             |
|  4 | two pair              | $\to$ | full house        |
|  4 | gut shot              | $\to$ | straight          |
|  6 | overcards             | $\to$ | pair              |
|  8 | open-ended straight   | $\to$ | straight          |
|  9 | four flush            | $\to$ | flush             |
| 15 | straight & flush draw | $\to$ | straight or flush |
Rule of 2/4
Multiply your outs by 2 when you are on the flop waiting for the turn.
Multiply your outs by 2 when you are on the turn waiting for the river.
Multiply your outs by 4 when you are on the flop waiting for the river (opponent is all-in).
Call if > pot odds (percentage method).
End of explanation
<END_TASK>