From jacobson@math-cs.cns.uni.edu Wed Oct 30 15:28:01 2002 Date: Wed, 30 Oct 2002 15:26:51 -0600 (CST) From: Mark Jacobson To: 810-030-01@uni.edu Subject: Follow-up exercises.... Oct 30th 030 VB class.... Here are some exercises that follow-up on the group exercise done in 810:030 class today at 2:30 p.m. on 10/30 today (Wednesday). Suppose there is a TextBox named txtPhrase where the used might have typed in a word or phrase, such as UNI Panthers or Ghostbusters or UNI Panther Volleyball or Ballet National Du Senegal or UNI Orchesis Dance Group or Happy Halloween for instance.... *** Exercise (practice) #1 *** Write the code to print out only the odd numbered letters in the phrase: 1 1 1 1 3 5 7 9 1 3 5 HpyHloen would be output if it were Happy Halloween - - - - - - - - *** Exercise (practice) #2 *** Write the code to print out the numbers 4, 8, 12, 20, 24, 28, 32, 36, 40 all on the same line of the Form1 object, but with semicolon spacing instead of comma spacing between the numbers. You must do this by using the For Next loop idea and only have each Print print one number at a time!!!! *** Exercise (practice) #3 *** Write the code to print out the letters in the word or phrase backwards. --------- Thus if txtPhrase was UNI Panther Volleyball the output would be: llabyelloV rehtnaP INU *** Exercise (practice) #4 *** Write the code to print out the word or phrase as a nice triangular pattern, as follows (with Ghostbusters as the example phrase from txtPhrase) G Gh Gho Ghos Ghost Ghostb Ghostbu Ghostbus Ghostbust Ghostbuste Ghostbuster Ghostbusters *** Exercise (practice) #5 *** Write the code to print out only every 4th letter, starting with the 4th letter, then the 8th, then the 12th, etc. So if the txtPhrase were UNI Orchesis Dance Group - - - - - - the output would be " hsnGp" ------ hsnGp with the " " there to make explicit that the space between UNI and Orchesis is part of the output. See you in class next month. Happy Halloween and Merry Christmas too, since oct 31 = dec 25 lol lol :-) Mark