heyyy, I wanted to know if, in my function I set the return to be a print of a value in a dict, is the return type a dict or a string ? (the value in the dict is a str)
my code for reference:
HANGMAN_PHOTOS = {
0: """ x-------x""",
1: """ x-------x
|
|
|
|
|""",
2: """ x-------x
| |
| 0
|
|
|""",
3: """ x-------x
| |
| 0
| |
|
|""",
4: """ x-------x
| |
| 0
| /|\\
|
|""",
5: """ x-------x
| |
| 0
| /|\\
| /
|""",
6: """ x-------x
| |
| 0
| /|\\
| / \\
|"""
}
def print_hangman(num_of_tries):
"""The function prints one of the seven states of the hanging man.
:param num_of_tries: number from 0-6
:type num_of_tries: int
:return: str?
:rtype: str?
"""
print(HANGMAN_PHOTOS[int(num_of_tries)])
def main():
# Call the function print_hangman
num_of_tries = 6
print_hangman(num_of_tries)
if (__name__ == "__main__"):
main()