11.07.2015 Views

Here - 1000 BiT

Here - 1000 BiT

Here - 1000 BiT

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

INSTRUCTOR NOTES 6 THE INPUT COMMAND _This lesson concerns the INPUT command, the idea of a string variable and the differencebetween a PROGRAMMER and a USER.In its simplest form, INPUT A$, there is no message in quotes in front We want thestudent to concentate on the central feature of an INPUT.^j^Similarly, we will give only the essential feature of each command for the first section ofthe book (through Lesson 14). We want the student to "see the forest" before going into ^jdetails. The commands required for interesting programs are:PRINTINPUTGOTOIFRNDallows outputinputinfinite loopingbranching and decisionsrandom numbers for gamesString variables are introduced using the "box" concept again. Variable names arerestricted to one letter for the time being. This allows faster typing and puts off discussion ofthe complicated naming rules until after our sprint to the RND command. ^^JWe will work with strings before numbers because strings make for more interestingprograms and offer a less confusing entry into the logical concepts of programming.^jThe "two hats" of the student, programmer and user of the program, cause much *Oconfusion at assignment time. PRINT is the programmer speaking, while the user'scomments are made only in response to an INPUT command and are stored in a string ^variable to be used or printed by the computer.QQUESTIONS:1. What two different things does the computer put into boxes? (One at programmingtime, and one from an INPUT.)2. How does the program ask a user to type in something?3. How do you know the computer is waiting for an answer?4. What is a letter with a dollar sign after it called?5. Write a short program which uses REM, PRINT and INPUT.6. Are you in trouble if the computer answers "EXTRA IGNORED" after an input?What made it do that?40

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!