This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
The function accepts as a path parameter for a text file (string). | |
The path whose path is passed as an argument contains a list of integers from 1 to n that are not sorted, comma separated, with one of the numbers in the sequence disappearing (i.e. missing from the sorted list). | |
Who_is_missing function operation: | |
A. The function returns the missing number in sequence (int). | |
B. The function writes the missing number in succession to a new file called found.txt. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
The function accepts as a path parameter to the file (string). | |
The file represents a playlist of songs and has a fixed format built from the song name, performer name (singer / band) and song length, separated by semicolon (;) without spaces. | |
An example of an input file called songs.txt: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
The function accepts as parameters: | |
1. Path to File (String). | |
Just as in the previous exercise, the file represents a playlist of songs and has a fixed format built from the song name, performer name (singer / band), and song length, separated by semicolon (;) without spaces. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Printing the welcome game screen | |
print ("HANGMAN_ASCII_ART", """ | |
_ _ | |
| | | | | |
| |__| | __ _ _ __ __ _ _ __ ___ __ _ _ __ | |
| __ |/ _` | '_ \ / _` | '_ ` _ \ / _` | '_ \ | |
| | | | (_| | | | | (_| | | | | | | (_| | | | | | |
|_| |_|\__,_|_| |_|\__, |_| |_| |_|\__,_|_| |_| | |
__/ | | |
|__ _/""") |
OlderNewer