For this activity you will create a stack and create some simple scripting that will give you a chance to review some of the fundamental concepts of programming.
Card 1: Sequence of Commands
Create all of the controls you need to complete this problem. For example, for this problem, you'll need at a minimum one field and one button. There is a file called sentences.txt in the Media/text folder on the server that you can use if you wish.
Problem: Given a list of sentences or words, delete all of the even numbered lines. Don't use a repeat loop for this (even though in real life you would probably use one.)
Card 2: if - then - else (conditional) structures
For this activity, copy the objects from the previous card and paste them here. Add other controls as needed.
Problem: Using the previous activity, create a set of radio buttons that lets the user choose between "Delete Odd" and "Delete Even". If the "odd" button is highlighted, delete the odd numbered lines; if the "even" button is highlighted, delete the even numbered lines.
Card 3: repeat loop structures
Create whatever controls you may need for these two activities. There are suitable text files for each activity in the media/text folder on the server.
For the first part, look for "SampleSentences.txt" and "SampleSentences2.txt".
Problem: Given a long list of sentences separated by returns, take the third word of each sentence and combine them into one long "nonsense" sentence.
For the next activity you may want to use 1Nephi.txt in the media/text folder.
Problem: Create a simple concordancer. Discover how many times each word occurs in a text and create a list of each word, followed by a count of the number of times it occurs in the text.