MCPcopy Create free account
hub / github.com/geekcomputers/Python / print_wrong

Function print_wrong

Industrial_developed_hangman/src/hangman/main.py:25–33  ·  view source on GitHub ↗

Print styled text(red). :parameter text: text to print. :parameter print_function: Function that will be used to print in game.

(text: str, print_function: Callable[[str], None])

Source from the content-addressed store, hash-verified

23
24
25def print_wrong(text: str, print_function: Callable[[str], None]) -> None:
26 """
27 Print styled text(red).
28
29 :parameter text: text to print.
30 :parameter print_function: Function that will be used to print in game.
31 """
32 text_to_print = Style.RESET_ALL + Fore.RED + text
33 print_function(text_to_print)
34
35
36def print_right(text: str, print_function: Callable[[str], None]) -> None:

Callers 4

user_loseMethod · 0.85
user_winMethod · 0.85
game_processMethod · 0.85
start_gameMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected