Beginner Event 3: The shot put
In the shot put, you need to be able to handle a heavy load of text. To make it easier for you to carry the load, you will be asked to balance text between two files.
IT pros are often called upon to work with text files in various configurations, and to perform different tasks on those files. One common request is to read a “master” text file and create multiple smaller files from the master file. At times this may be as complicated as reading through a log file and writing all the entries related to a specific server to a new text file so that the entries can be more easily synthesized. At other times, the task might be easier, such as splitting a long file into smaller files.
In this scenario you must read a text file named Shot Put.txt, which is in the Competitor’s Pack. You will then create two text files: Shot Put A.txt and Shot Put B.txt. Take the first paragraph from Shot Put.txt and write it to Shot Put A.txt. Then take the second paragraph from Shot Put.txt and write it to Shot Put B.txt. Rename Shot Put.txt to Shot Put.old.
Advanced Event 3: The shot put
The shot put is an event involving putting a heavy metal ball. Some people think decathlon events are all the same. For the shot put event, you will be required to find words in a file that contain all the same vowels.
Some people write poetry with words that contain only the same vowel. Such a word is called a univowel, and when each word in a sentence contains the same one vowel, it is called univowel writing. Here is an example of such univowel writing:
Ask an aardvark,
Good goon go googoo,
So soon so long.
Obviously, we Scripting Guys are not great univowel writers, so do not look for a Hey Scripting Guy! article written in univowel anytime soon, or:
So do not look for soon,
An aganst aardvark away,
So soon so long.
Your task in this scenario is to parse the Wordlist_ADV3.txt file (in the Competitor’s Pack), pull out all of the univowel words, and write the univowel words to a new text file.
All aardvarks say,