LIBRARY OF THE UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN 510.84 ho. QA3-QAS cop- 2 The person charging tins material is re sponsible for its return to the library from which it was withdrawn on or before the Latest Date stamped below. Theft, mutilation, and underlining of books are reasons for disciplinary action and may result in dismissal from the University. UNIVERSITY OF ILLINOIS LIBRARY AT URBANA-CHAMPAIGN dfclr • L161 — O-1096 Digitized by the Internet Archive in 2013 http://archive.org/details/plldodoloopinpl1644fink liV 6 ty UIUCDCS-H-7U-6^ jw^ui pllcio: The DO Loop in PL/l A Lesson for PLATO IV by Barry Sholem Finkel May 197^ UIUCDCS-R-7^-6i+lf plldo: The DO Loop in PL/l A Lesson for PLATO IV by Barry Sholem Finkel May 197^ Department of Computer Science University of Illinois at Urb ana- Champaign Urbana, Illinois This work was supported by the Department of Computer Science and was submitted in partial fulfillment for the Master of Science degree in Computer Science, I97U. I 1 I ACKNOWLEDGMENT The author wishes to thank Professor Jurg Nievergelt for suggesting the thesis topic and making valuable comments and suggestions during the evolution of the lesson. Professor H. G. Friedman also had numerous suggestions regarding interfacing this lesson to the other computer science lessons. The PLATO IV consulting staff was also very helpful while I was learning the intricacies of TUTOR language. Mrs. June Wingler must also be thanked for her fine typing of this manuscript. IV TABLE OF CONTENTS page 1. INTRODUCTION. . 1 2. DESIGN CONSIDERATIONS AND STRUCTURE 3. CONTENT 7 k. THE DRILLS. . . 10 5. PROGRAMMING STYLE AND TECHNIQUES 6. STUDENT EVALUATION. 27 BIBLIOGRAPHY 28 1. INTRODUCTION The Basic Computer Science (BCS) courses at the University of Illinois are being transferred to the PIATO computer. The basics of PL/1 and FORTRAN are being taught by computer as a supplement to the classroom lectures and discussion sections. Topics include not only programming languages, but also numerical analysis, sorting, and monte carlo techniques. These BCS lessons will be used by students at the sophomore level who wish to learn about computer programming for use in the professions of engineering, business and commerce, secondary school teaching, architecture, social and behavioral science. It is assumed that these students have had no previous experience with computers; thus the PIATO lessons must begin with the basics of computers. The lessons that presently comprise the PL/l sequence are: pllintro (introduction plldata (data types) pllops (operators) pllarith (arithmetic expressions) pllstring (string handling) pllif (IF-THEN-ELSE statements) plldo (DO statements and loops) pUarray (arrays) pllproc (procedures and block structure) pllio (input- output) pllrecurse (recursive subprograms) Lesson plldo assumes that the student has mastered the previous lessons and thus commands a knowledge of PL/l datatypes, expressions (both arithmetic and string), and IF statements. The examples used in the DO loop lesson are very limited since GOTO, PROCEDURE, and input- output statements cannot be included. Arrays, structures, and other complex datatypes also cannot be used as they first appear in later lessons. The use of DO groups, the non-iterative form of the PL/l DO statement, is explained in the IF-THEN-ELSE lesson, since DO groups are the logical way to group statements appearing after a THEN or ELSE clause. Plldo, therefore, concerns itself only with DO loops, in which the statements of the loop may be executed repeatedly. 2. DESIGN CONSIDERATIONS AND STRUCTURE The lesson plldo was designed with two uses in mind-serious study a*d browsing. The student taking the lesson may be trying to master the material on DO loops, or he may be refreshing his knowledge on a particular facet of DO loops. He may be studying for an upcoming examination, or he may be searching for the form of the DO loop that best suits the needs of his computer program. To accomplish this design objective the student is given some freedom; he chooses how he will spend his time taking the lesson. He can progress through the lesson in any of three modes: normal (text and drills), text (only) or drills (only). For the student who is learning about DO loops for the first time, the normal mode lets him study the material in a logical order: 1. Introduction to PL/l DO loops. 2. DO WHILE statement. 3. Iterated DO statement. h. Nesting of DO loops. 5. Mixing of DO loops. But for the student who is browsing through the lesson to review one or more of these five topics or a specific subtopic, there is an extensive table of contents which allows the student to jump to any display in the lesson. At any time the student can return to the table of contents display to select another topic or subtopio to review. For the student who is studying for an examination, the drill mode lets him try all four drills, see his score, and then return to the contents page to select the parts of the lesson that he wishes to review. For one who is browsing through the lesson to review the syntax of a specific form of the DO statement, the text mode allows him to bypass the drills and see only the text. The -TERM- key also lets the student jump around in the lesson-to any one of the four drills (he need not know the exact section number of each drill), the contents page, the mode page (where he may change modes), the end page (where he may see his score for the drills). He can also jump out to a lesson where he may record comments and questions concerning the lesson (and then return to where he was in plldo), or he can return to the master directory of Computer Science lessons. Some lessons present a topic and then return the student to the contents page where he can select the next topic for study. This system works very nicely if all of the topics presented are equal and separate. But if the topics are interrelated (i.e., knowledge of one topic depends upon knowledge of another) this system will not work. For example, one cannot mix the DO WHILE and iterated DO forms of the DO statement before mastering each form separately. Since the five topics presented in plldo are interrelated, another lesson structure must be found. The lesson structure that is used in lesson plldo (see Figure l) lets the student see all five topics in the desired sequence; the -NEXT- key accomplishes this automatically. But after each topic the student is reminded that he may return to the contents page to select another topic if he wishes. However, this desired sequence is not binding on the student as he can always return to the contents pages and hence can move freely throughout the lesson. Thus, unless the student consciously wants o ft § w w O •P O -P CO o •H W PQ H •H to depart from the normal sequence, he automatically sees the five sections in their logical order. 3. CONTENT The content of the lesson is divided into two classes-text and drill. The lesson presents five topics and four drills. Ideally there should be a drill after each topic, but limitations of lesson space and appropriate drill material prevent this. The first topic, introduction, is so short that an accompanying drill is not needed. The next section, DO WHILE, is important because it is the first introduction to the concept of an iterated group of statements; thus it ends with two drills. The third and fifth topics each are followed by drills, but the fourth, loop nesting, lacks a drill. Tbe author has not been able to construct a drill on loop nesting that contains easily judged questions and is short enough to fit in the lesson. Since the lesson would be relatively small and the topio of PL/l DO loops is relatively large, it was obvious from the outset that only a portion of the material eoneerning PL/l DO loops could be presented. It was decided to present the two basic forms of the DO statement, how to nest loops, and how to mix these basic forms, other subtopics such as efficient programming and "structured" programming would be left to later lessons for far more relevant presentation after the student would have learned more PL/l statements. The order of presentation of the five topics was dictated by the interrelations among the topics. The introduction had to cone first, loop nesting had to follow at least one of DO WHILE and iterated DO, ' and 8 mixing of loops had to follow both of the basic forms. It was decided to present the DO WHILE rather than the iterated DO immediately following the introduction because it was felt that the DO WHILE would be better as an introduction to iteration for the beginning programmer. (its flow diagram is simpler-see Figure 2.) Some PL/l texts present the iterated DO before the DO WHILE because the iterated DO has a direct counterpart in FORTRAN, and those texts are designed for those who already know the basics of FORTRAN. Then it was decided to defer the presentation of nesting until both forms of the DO loop had been presented, because more meaningful examples could be presented if one were to nest DO loops of different forms. Finally, mixing of loops follows nesting because nesting is a more important concept than mixing; if a student were pressed for time it would be better if he were exposed to nesting. He could always return to the lesson at a later date and study mixing. Topics that are not presented include ending nested loops with one END statement and forbidden branching into DO loops. The former is not included because the author considers this bad programming; ending two loops with one END statement can confuse the nesting and lead to incorrectly written programs. Illegal branching into DO loops was omitted because the GOTO statement is not presented in a lesson occurring before plldo in the PL/l sequence. By using DO loops effectively (in a structured program), the GOTO statement in most cases is not necessary. 9 STATEMENTS OF THE LOOP 1 NEXT STATEMENT DO WHILE(condition); i s •*■ start D APPEARS i BY LS^ili 1 1 1 ' lncr | | 1*1 | APPEARS e «- end E ZI T0 \MISSING 1 e * sign(i) T C V L STATEMENTS OF THE LOOP I C_V + i ] J NEXT STATEMENT DO C_V = start TO end BY incr; figure 2. Flow Diagram - DO WHILE and Iterated DO 10 k. THE DRILLS The Questions and Answers Webster defines a drill as "any exercise, mental or physical, enforced with regularity and by constant repetition. " The term "drill" aptly describes the four sections of the lesson which test the student's knowledge of the material previously presented. Tests not only serve to assign a numerical rating to the student, but also serve to let the | student know how well he has learned the material. A major feature of the questions asked is that they are "random"- that is, the numeric values (parameters) contained in the questions are randomly generated. If the questions were "static, " then the student could memorize the answers to the questions. He would achieve high scores on the drills, but would obtain no feedback from them. With random questions (and hence random answers) the student can repeat a drill for additional practice; the drill has "regularity and constant repetition." Answers to the drills are short and exact for ease in judging. When one presents an incorrect PL/l statement and asks the student to decide what is wrong with its syntax, the answer may be obvious, but its statement may take any number of forms in English. Thus, it is hard to judge the response to determine whether the student responded with a correct answer. If the questions are properly phrased, then student responses such as "yes," "no," "DO 1=1 to 6;, " "k-k+1, " and numeric values (k, 10, 3, etc.) along with their variants "y, " "n " "DO I = 1 TO 6 BY 1;, " k-k+1, " and numeric expressions (3/2, 5*2, 2+l) are easily judged in the TUTOR code for the drills. In the drills the 11 student is not asked to write sections of PL/l code, as happens on hour exams, since the answer would be extremely difficult to judge. In the future "jumpoufs" (linkages) to the PIATO-PL/l "consultant" may be possible; the student could then test sections of PL/l code. Grading As the student progresses through the lesson and takes the drills he is graded. To conform with the other lessons in the PL/l sequence, a numeric grade between zero and one hundred is given when the student completes the lesson. There are four drills, each one following the same basic flow diagram (Figure 3) and worth 2 5 points. At the beginning of each drill the student is awarded all 2 5 points. As he progresses through the drill two error counts are kept-errcnt and toterrs. Errcnt counts his errors on this "pass" of the drill; if the student answers all of the questions but makes too many errors in the process, errcnt is reset to zero and the student is forced to answer all of the questions again (of course, with a different set of randomly chosen parameters). Toterrs is a running total of the errors accumulated on all "passes" through the questions. After the student has successfully answered the questions with a sufficiently small errcnt, two to four points (errpts) are deducted from his 2 5 points for each error counted by toterrs. The lowest score possible is zero since negative scores are converted to zero. Also, the score that is recorded for each drill is the maximum score that the student attained on any attempt of that drill; thus a student can retry a drill for extra practice or improving his score knowing that he will not be penalized for achieving a lower score than he did on his previous trials. The grading formula is this: exampts. ^ max (exacts,, max (0,2 5 - (errpts. * toterrs. ))) 1 12 INTRO- DUCTORY PAGE SCORE +-25 TOTERRS-*- ERRLMT «- x G I ERRCNT ASK QUESTIONS \CCUMULATE ERRCNT TOTERRS +■ TOTERRS + ERRCNT I YOU HAVE MADE ERRORS . SCORE *■ MAX (0 , SCORE-ERRPTS*TOTERRS) RECORD THE SCORE IN EXAMPTS -BACK- I PRESS -NEXT- TO —| CONTINUE, -BACK- TO RETRY DJ -NEXT- NEXT DRILL OR DISPLAY Figure 3. Basic Structure of the Drills 13 When the student has completed the lesson and arrives at the end pace, he is told whioh drills he took, the scores that he received, and his total numeric grade for the lesson; the scores of the drills that he did not take are zero. If he 1. satisfied with the grade he can exit from the lesson; if he desires he can use the -TEEM-key to retry any or all of the drills. Drill 1 Tne first drill tests the student's knowledge of the WHILE condition in the W WHILE statement. Given a two-part condition and a set of values, the student is asked to determine whether the set of values satisfies the condition or not. Although the "condition" is presented in the first part of the lesson, the basic material has been presented earlier in lesson "pllif . " This drill presents the following DO statement: DO WHILE( (LMGTH > I) | (WIDTH < =j))- where I and J are randomly chosen in the interval [-10,10]. Five questions of the form "When LEKTH=i and WIDTH=j is the loop executed?" are asked. The values of i and j are chosen randomly according to the following formulae: 1-15 < i < 1+8 J_? 5 J " ~ J+l6 if i > I J-5 < j < J+18 if i < i Thus it can he seen that Probability (i < l} = l6/2h = ^ ^ p( . > j given that i < l) = lQ/2h = ^ Combining ^ ^ ^ ^ Ik P(i < I and j > J) = (2/3)*(3A) = 2A = 1/2. Thus the answer to the random question is "no" one-half of the time and "yes" the other half of the time. Drill 2 After the student has mastered the "condition" he progresses to the -second drill where he is presented with an entire loop. The questions that are asked force him to mentally execute the entire loop as a computer would do. He must know at which point during the loop execution the condition is tested. As the loop is executed, statements in the loop change the values of the variables that are tested in the condition; thus the student must know how these changes affect both the value of the condition and the number of times that the loop is executed. The second drill presents the following DO loop: I = a; < a < 5 J = b: < b < 6 DO WHILE (l*J -c). L5 The answers, being numeric, are very easily judged through TUTOR commands. After the values of a, b, c, d, and e have been chosen randomly in the desired intervals, the numeric answers to the questions are calculated. The values of I and J after one loop execution are a.d and b + e, respectively. The number of loop executions (called nloops) can be calculated in a number of different ways; the first method attested was to solve a complex equation for nloops in terns of the parameters a, b, c, d, and e. As the resulting formula was very complicated, it was decided that it would he easier to simulate the loop execution through the use of TUTOR "calc" and "branch" ccmnands and count the number of loop executions. After the value of nloop s is obtained, the values of 1^ and j^ are easlly caloulated frQm ^ formulae 1^ . a + (nloops , d) ^ j^ _ fc + ^^ ^ ^ Help is available at any time while the student is taking the drill, if he lncorrectly msweIS a quest . on> ^ explanatory message . s written on the screen: "One loop execution adds d to the initial value, a, of I. » J final =J initial + an additional e for each loop execution " If the student incorrectly calculates the value of nloops, the only message that he sees is "y our calculations are incorrect:"; there is not much more that he can be told without telling him the answer. If the student feels that he is thoroughly confused, he can press the -HELP- xey to see the DO loop executed step-by-step on his plasma panel. The loop is displayed with the statement currently being execute b™« ■ y ue±ng executed appearing m a box. Counters keep track of the valuer n-p t t ^ -, values of I, j, and nloops> Aftep ^.^ ^ ^ sequence the student returns to complete the drill. 16 Drill 3 The third drill tests the student's knowledge of iterated DO loops. Given the values for which the loop is to he executed the student is asked to write an iterated DO loop. This proeess involves first finding the three loop parameters-initial value, final value, and incremented then using these parameters in writing the iterated DO statement using eorreet syntax. The student who understands these three parameters and who knows the correot syntax for this form of the DO statement will successfully complete this drill. The third drill is prohahly the most interesting with respect to TUTOR coding. In this drill the student is asked to write five iterated DO statements, given the values that the loop parameter should assume. From this list of values the student must pick the initial value, the final value (for the TO clause), and the difference hetween successive values (for the BY clause). There are three possiole variations cf the correct response: DO I = init TO end BY incr; DO I = init BY incr TO end; DO I = init TO end; (if the value of incr is l) Another complication is the fact that in this drill, as in the other three, the parameters init, incr, and end are chosen randomly. The only way, therefore, to judge the response containing keywords that must appear, optional keywords, and randomly generated numbers is to parse the response, just as is done in compilers. The keywords are translated into single characters using the following table: 17 KEYWORD TRANS IATION DO do do ^ i (a special internal character) BY k by k I i TO 2 tO z P. the null string (removes blanks) fa q By doing this we accomplish five things: 1. Capital letters are translated into small letters. 2. A blank between the DO and the I is required. 3. All other blanks are removed. k. The required keyword combination "DO I=" is translated into the single character "q". 5. The other keywords "TO" and "BY" are translated into 'z" and "k" respectively. The three variations of the correct response have become: q init z end k incr; q init k incr z end; q init z end; ( if the value of incr is 1) A subroutine (TUTOR unit) called exprssn extracts the numeric values from the response; it lumps consecutive digits and operators (+, -, *, /) into one expression which TUTOR evaluates and stores for easy comparison to the correct value. The single character keywords and the exprssn unit make the parsing of the student response very easy. A state diagram of the parser is included below as Figure k. With complete parsing of the iterated DO statement, extensive error diagnostics are available, and thus no HELP sequence is needed. The student will see one of the following messages if his DO statement contains syntactic errors: 18 fBEGII M "DO I =*' MISSING ILLEGAL EXPRESSION s INCORRECT s=start s = starting expression i = increment expression e = ending expression q = "DO I = " k = "BY" z = "TO" • = any other character start = correct value for s incr = correct value for i ILLEGAL EXPRESSION "TO" MISSING "BY" MISSING ILLEGAL EXPRESSION < - e INCORRECT e correct incr=l i > incr_ i IS TOO HIGH _ i > incr i < incr i < incr i IS TOO LOW i = -incr i HAS WRONG SIGN _ i = -incr i=mcr i # "TO" MISSING ILLEGAL EXPRESSION e INCORRECT J > MISSING SEMICOLON i=incr any char, EXTRA CHARS APPEAR END Figure k. State Diagram for Drill 3 (iterated DO) 19 Your DO statement must begin with "DO I =" Your starting expression for I is illegal.' (i e 4+*s ) You have omitted the BY clause. The expression in your BY clause is illegal The value in your BY clause is too low (high) The value in your BY clause has the wrong sign The expression in your TO clause is incorrect The semicolon is missing. Extra words appear in your answer. After the student has made the same mistake twice he sees the correct answer in the form "Try ..." Drill k The fourth drill is concerned with mixing of PL/l DO loops-combinin, two or more loops into a single loop. A flow diagram is presented and the student is asked to correctly label the boxes and decision diamonds. Flow diagrams are presented throughout the lesson to explain the workings of the various forms of the DO loop; by combining two flow diagrams the student can use his knowledge of the previously presented flow diagrams to correctly "fill ln the boxes . „ These ^ ^^ ^ ^ ^^.^ throughout the lesson because the author believes that they are essential for.- 1) understanding the workings of the DO statements and 2) writing computer programs. The loop that is presented is this: DO K = a BY b WMLE(X c Y), d TO e; where a, b, d, and e are randomly generated numbers and V represents one of these five relational operators: >-<>_<. j/ x^. ^, _, ^ >=f <= The answerg that fit in the boxes and decision diamonds are given in Figure 5. The student must realize that a condition may be expressed in different ways (e.g., F < 10 ls equivalent to ,(, > 10); the correot response be±ng determined by the labels (TKUE and FALSE) which appear on the paths eminating from the decision diamonds. DO K = a BY b WHILE(X c Y) , d TO e; 20 NEXT STATEMENT Figure 5. Flow Diagram Presented in Drill k 21 The judging of answers is relatively easy; extra characters such as "is , "?", ";", V" are eliminated, leaving only the numeric response (a, b, d, and e) or the relational operator (c). Very little help is given if the student answers incorrectly; there is not much that can be given without telling the student the correct answer. Five different helpful messages are available: "Initialize K. ", "Increment K. ", "Compare X and Y. ", "Reset K. ", and "Has K reached its final value? ". If the student becomes completely lost and does not know the correct answer, he is told that he can review the flow diagrams presented in the sections on DO WHILE and iterated DO. Single Questions Throughout the lesson there are single questions asked concerning material immediately preceding. These questions are not part of the drills; the questions do not have random parameters and no record is kept of the number of wrong responses. These questions are included primarily to break up the monotony of the lesson. The student will find questions every few displays and thus must learn the material presented before he can proceed. Without these short questions the lesson would be very much like a textbook-pages of text with exercises at the end of each chapter. There is no certainty that the student is absorbing the material he is reading from the textbook until he attempts the exercises; he is not forced to complete the exercises and possibly could skip them completely. With frequent questions that must be answered, the material that the student has read is reinforced in his mind; he must learn one basic concept before proceeding to the next. 22 The type of question that is asked throughout the lesson helps the student learn the syntax of the DO statements - "What is wrong with this PL/1 statement?" Some of the statements presented are incorrect; some are correct. The answers to these questions consist of key words and their synonyms; all other words are ignored. For example, if the correct response is "The semicolon has heen omitted from the end of the statement." then any response containing either "semicolon" or ";" is judged correct. If neither appears in the student's response, then the answer is judged wrong. If the student answers incorrectly, he usually is told the correct answer so that he may proceed. In a few places hints are given; if the student fails to answer correctly two to six times (the exact number determined by the question) he is immediately sent hack to a previous display for review. 23 5. PROGRAMMING STYLE AND TECHNIQUES There are a number of techniques which are used in lesson plldo; some aid the author and some aid the student. The lesson is divided into five major sections, but through the table of contents the student is able to jump to virtually every display page of the lesson. Each page display is labelled in the upper left corner with either the sub-section number of the -TERM- which allows the student to jump to the page. This identification makes it easier for the student to identify the specific section of the lesson about which he is making comments; it also helps the author locate sections of his lesson because the section identification appears in his lesson listing (a convenience for those whose listing is long). In the future, these section numbers may be used to let the student enter the lesson at the point where he ended his last session. Normally the student would not use the table of contents to proceed through the lesson; he would continually press the -NEXT- key to "turn the page, » as if he were reading a textbook. Occasionally the student would like to review the previous page; for this purpose the -BACK- key is always active. The activation of this key requires very little TUTOR code; just one "back" statement at the beginning of the code for each display page. At the end of the code for each page a "next" command appears. In TUTOR this statement is not always required since in its absence a keypress of -NEXT- at the end of a unit (page) takes the student into the unit whose code immediately follows. Since it is 2k possible that other units might be placed between one unit and its logical successor (e.g., unit nest 9 - unit nest 9 a (-HELP- for nest 9 ) - unit nestlO) it is best to place a "next" command at the end of each display page. TUTOR is designed so that a unit is equivalent to a page of a textbook; entering a new unit automatically erases the previous display page (unless the author requires that erasing be inhibited). But sometimes a complete display page is too much for the student to see all at once. Therefore there has to be a method of presenting display pages part-by-part. One immediately obvious way is to use new units for each part of the display and inhibit erasing the previous displayed portions of the page. This method is not recommended, since it requires more code (more "units, " "nexts," and more "inhibit erases") and negates the builtin TUTOR structure. As a second technique one can insert "pause" commands between the sub-pages; after viewing one sub-page the student can press any. key to see the next sub-page. This method lets TUTOR handle the erasing of the display, but inactivates the -BACK- key. (Every key behaves like the -NEXT- key. ) One can trap a -BACK- keypress and thus reactivate the -BACK- key, but what about the -HELP-, -TERM- and the other special function keys. Since trapping each one after each subpage is very awkward and uses much code, a new method must be found. This is the "wait" unit which was designed by Dave Eland and Professor H. G. Friedman. It overcomes all of these problems-it lets TUTOR handle all display erasing and keeps all special function keys active. One of the special function keys that is active in every lesson is the -TERM- key. Plldo uses this key to allow the student easy access to the important display pages in the lesson. Besides being able to 25 return to the table of contents pages, a student can see the mode page, SO to the end of the lesson (to see his lesson grade), jump to the counts lesson, and attempt any of the drills. For the student who *ay forget what ten. na.es are implemented in the lesson, -TERM- "terms" allows him to see a list of the term names. The -HE!*- key is not active at all times throughout the lesson as seme say it should be because one can generally receive enough help by reviewing the previous page or two. However, three help units are included in the lesson. Two are verv «*hm* • * ±wu are very short, just explaining the mathematical symbols V and "! ". ^ thlrd help m±t ±< part Qf ^ second drill, discussed above. Recent additions to the TUTOR language ■*» it possible for one help unit to be active at all places in a lesson where no specific help units have been written. Thus if a student studying plldo presses the -HEIP- key and no specific help units are active, then he is told that no help is available and given the option of writing a comment in lesson escemments for his course director or teaching assistant to see. This lesson places major emphasis on graphics, especially flow diagrams because the author feels +h«+ +1, unor leels that they are an integral part of computer programing. Por one, it is easier to learn how the different forms of the PL/l «, loop operate by observing the transfer of control between statements. For another i+ i e •« • another, it is easier to write computer programs if one first designs and then corrects fi™ *• corrects flow diagrams before writing the actual PL/1 code. The more the student is exposed to fl«r *■ exposed to flow diagrams, the easier it will be for him to use them. To aid in displaying flow diagrams on the plasma panel a number of TUTOR devices were used. The first of th me nrst of these was the set of eight 26 special half arrow characters. They were designed so that they could be used with course grid lines of the plasma display. For ease in plotting, these special characters were labeled as per a compass. KW . NE A w SW SE Since they would only be displayed in pairs, four units (subroutines) were written: plotswse, plotwnws, plotnwne, plotenes. Of these four units, all are used except plotnwne; there being no need for an upward- pointing arrow in the present flow diagrams. The unit is being kept in the lesson in case it is needed in the future. Other elements of flow diagrams include straight lines, rectangles, and decision diamonds. Straight lines are easily drawn via TUTOR; units "box" and "diamond" were written to draw the rectangles and decision diamonds. These units not only save code in the lesson and make the TUTOR code more readable, but also help in designing and relocating displays containing flow diagrams. The author recommends these half-arrows and graphic subroutines (units) for all lessons in which flow diagrams play a major role. 6. STUDENT EVALUATION About one-hundred students have used lesson plldo as a part of their basic computer science course material. From the questionnaires that they have completed one can see that opinions differ from student to student. Concerning examples, some thought that there were too many, and some thought that there were too few. The "average" opinion was that there was just the right number of examples. Similar opinions were expressed concerning the number of exercises. Students felt that exercises were clear and helpful. The text material was clear; there was neither too much nor too little. The displays (flow diagrams and other graphics) were very good. Commenting on the lesson, students wrote that they lerned much; the lesson was fairly easy to use, was better than a book, and was better than a lecture. Sixty students who took eight lessons in the PL/l sequence rated lesson plldo as the best lesson. 28 BIBLIOGRAPHY Alpert, D. and D. L. Bitzer, "Advances in Computer- Based Education," P Science, No. l6 7 (March 20, 1970), pp. 1582-1590. Bates, Frank and Mary L. Douglas, Programing Language One, Second Edition, Prentice-Hall, 1970. ■n T B Sherwood and P. Terczar, "Computer-Based Science Education, BltZ6r ' C^Reporfx™ Computer- Based Education Research lah oratory, University of Illinois at Urh ana- Champaign, December 1972. Hicks, Bruce L. and Hunka, S., ™» "w^r ^d the Computer, Philadelpha: W. B. Saunders Co., 1972. March 1973. BIBLIOGRAPHIC DATA SHEET 4. Tit !<• .uul Sunt it lc I. Report No. UIUCDCS-R-71+-6M* plldo: The DO Loop in PL/l A Lesson for PLATO IV 7. Author(s) Barry Sholem Finkel 9. Performing Organization Name and Address Department of Computer Science University of Illinois Urbana, Illinois 12. Sponsoring Organization Name and Address Department of Computer Science University of Illinois Urbana, Illinois 15. Supplementary Notes 3. Kn ipient'a A, ( , 5- Report Dace May I97U 8- Performing Organization Rept, No. 10. Project/Taslc/Work Unit No. 11. Contract /Grant No. 13. Type of Report & Period Covered 14. 16. Abstracts plldo is a lesson written for the PLATO IV computer aided instruction system and designed to teach fundamentals of PL/l DO loops. This report describes the design considerations, structure, content, drills, programming techniques, and student evaluation of the lesson. 7. Key Words and Document Analysis. 17a. Descriptc 'b. Identifiers /Open-Ended Te i'c COSATI Field/Group Availability Statement release unlimited RM NTis-35 (10-70) ' " — 19. Security Class (This Report) _- UNCLASSIFIED 20. Security Class (This Page UNCLASSIFIED 21. No. of Pages 31 22. Price USCOMM-DC 40329-P7 z**$fc to m CO <£3 -J