def take_bet(player: dict) -> float:
    """Prompt the player for how much money to bet."""
    while True:
        print(f"\nYou currently have ${player['money']:.2f}")
        bet = input('How much money would you like to bet on this hand? (min: $20)\n> $')
        if not bet.isdigit() or float(bet) < 20:
            print('You must bet at least $20\n')
            continue
        if float(bet) > player['money']:
            print(f"You only have {player['money']}. You can't bet more than you've got\n")
            continue
        rounded_bet = round(float(bet), 2)
        player['money'] -= rounded_bet
        return rounded_bet