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.

LESSON 6THE INPUT COMMANDUse INPUT to make the computer ask for something.Enter10 REM TALKY-TALK15 PRINT "clr"20 PRINT "SAY SOMETHING"25 INPUT A$30 PRINT35 PRINT "DID YOU SAY"40 PRINT A$Run it When you see a question mark, type "HI" and press the RETURN key.The question mark was written by INPUT in line 25. The flashing cursor means thecomputer expects you to type something in.When you enter "HI", the computer stores this word in a box named A$.Later, in line 40, the program asks the computer to print whatever is in the box named A$.Run the program again and this time say something funny.STRING VARIABLESA$ is the name of a "string variable." The computer stores string variables in memoryboxes just like the boxes it puts program lines into. The name is written on the front ofthe box and the string is put inside the box.41

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

Saved successfully!

Ooh no, something went wrong!