Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Problem 1: Random selection in an array
- ---------------------------------------------------------------------------------------------------------------------------
- Design a function to randomly return a string from an array of strings.
- Problem 2: Hiding text
- ---------------------------------------------------------------------------------------------------------------------------
- Design a function that returns a string consisting of alphabetic characters and underscores based on an array of characters
- that should be shown. For example, if the word to be guessed is "hello" and
- the user has guessed the characters 'e', 'l' and 'g', the function will return the string "_ell_".
- Problem 3: Selecting file input based on length
- ---------------------------------------------------------------------------------------------------------------------------
- Design a function that reads in a file of words (with each word on one line) and writes the words with length greater than
- or equal to n to a new file (n is user defined).
- Problem 4: Reading a file into an array
- ---------------------------------------------------------------------------------------------------------------------------
- Using your solution to Problem 3, design a function to read in all words with a length greater than or equal to 6 into an
- array.
- Problem 5: Hangman
- ---------------------------------------------------------------------------------------------------------------------------
- Using your solutions to Problems 1 through 4, implement the game Hangman.
- Use the following command to get a text file of words to try with your game:
- $ git clone https://github.com/gpric001/SI_CS12.git
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement