--- title: "Beginner’s Programming, III" type: "article" slug: "beginners-programming-iii" url: "http://localhost/article/beginners-programming-iii/" markdown_url: "http://localhost/article/beginners-programming-iii.md" published_at: "2026-02-15T15:35:52+00:00" modified_at: "2026-06-21T23:26:20+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "This month, let us first personalize our program. Clear the screen and ask your student to type his name. The name is ENTERed into a string variable and can be used any place in the program by calling the string variable. 3000 CLS 3005 PRINT AT 10, 4; \"<--type your name-->\" 3010 INPUT \"your name\";f$…" category: - name: "SUM" slug: "sum" taxonomy: "category" url: "http://localhost/category/periodicals/sum/" post_tag: - name: "BASIC (programming language)" slug: "basic-programming-language" taxonomy: "post_tag" url: "http://localhost/tag/basic-programming-language/" - name: "Full Text" slug: "fulltext" taxonomy: "post_tag" url: "http://localhost/tag/fulltext/" - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" - name: "Tutorial" slug: "tutorial" taxonomy: "post_tag" url: "http://localhost/tag/tutorial/" - name: "Type-in program" slug: "type-in-program" taxonomy: "post_tag" url: "http://localhost/tag/type-in-program/" model: - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "Bill Woodward" slug: "bill-woodward" taxonomy: "indiv" url: "http://localhost/indiv/bill-woodward/" publication_r: id: 10242 title: "SUM" type: "periodical" url: "http://localhost/periodical/sum/" authors_r: - name: "Bill Woodward" slug: "bill-woodward" taxonomy: "indiv" url: "http://localhost/indiv/bill-woodward/" volume: "3" issue: "3" issues_articles: - id: 52364 title: "SUM v3 n3" type: "issue" url: "http://localhost/issue/sum-v3-n3/" pages: "13-14" pubdate: "March 1985" related_articles: - id: 44189 title: "Beginner’s Basic Programming" type: "article" url: "http://localhost/article/beginners-basic-programming/" - id: 44191 title: "Beginner’s Programming (Part II)" type: "article" url: "http://localhost/article/beginners-programming-part-ii/" - id: 44194 title: "Beginner’s Programming (Part IV)" type: "article" url: "http://localhost/article/beginners-programming-part-iv/" archive_link: false --- # Beginner’s Programming, III This month, let us first personalize our program. Clear the screen and ask your student to type his name. The name is ENTERed into a string variable and can be used any place in the program by calling the string variable. ``` 3000 CLS 3005 PRINT AT 10, 4; "<--type your name-->" 3010 INPUT "your name";f$ 3050 CLS 3060 PRINT AT 4,8;"Hello, ";f$ ``` -Note- The 2068 lets you enter a prompt in your input statement in line 3010. I will use this format in the future. If you are using a 1000 series just ignore the prompt. Have you given numbering the problems any thought? A variable needs to be assigned and initialized to do our counting for us. Tell the computer where to place the number. Since we need to add 1 to our variable for each problem, let’s start our variable value at 0. We also need a clean screen for each problem. ``` 3040 LET c=0 3350 CLS 3340 PRINT AT 3,2;"No. ";c+1 3370 CLS ``` This line clears the number with the problem. EDIT line 3380. ``` 3380 PRINT AT 3,2;"No. ";c+1; AT 6,0;x; "+";y;"= ";z 3430 LET c=c+1 ``` The correct answer routine works with the numbering routine and allows us to give the number of correct answers out of a given number. Assign and initialize a variable; decide number of problems to a series and increment the answer number. ``` 3020 LET a=0 3330 IF c=10 THEN GOTO 1200 3440 LET a=a+1 ``` The routine at line 1200 not gives the number correct but reinitializes the variables only also and asks if the student wishes to practice more. ``` 1200 PRINT AT 10,6; "You got" a;" out of ten." 1210 LET c=0 1215 LET a=0 1220 PRINT AT 12,3; "Would you like another play?" 1230 PRINT AT 14,3; "press y or n followed by ENTER" 1240 INPUT "y/n"; b$ 1250 CLS 1260 IF b$="y" OR b$="y" THEN GOTO 3070 1280 CLS 1290 PRINT AT 8,5; "Thank you for playing, "; AT 10,5;f$ 1300 PAUSE 200 1305 CLS 1310 STOP ``` You can EDIT the lines to the other parts of the program where they are needed. Next month we will start on our LOGO. There is a smiley face if the answer is correct and a frowney face if the problem is wrong. Every child of any age that I have used this program with has enjoyed the fast feedback on his or her answers. Some have deliberately answered wrong just to see the frowney face develop.