home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 233
/
233.d81
/
qu.lamer
< prev
next >
Wrap
Text File
|
2022-08-26
|
4KB
|
270 lines
uLAMER to ADVENTURER QUIZ
What does the computer show when you
type:
PRINT "HELLO"
and press ENTER/RETURN?
Nothing
"HELLO"
*HELLO
SYNTAX ERROR
What does the computer show when you
type:
10 PRINT "HELLO"
and press ENTER/RETURN?
*Nothing
"HELLO"
HELLO
SYNTAX ERROR
What do you type and ENTER to see the
program that is in memory?
RUN
NEW
LOAD
*LIST
Program lines are listed in what
order?
You typed in the lines
*Of their line numbers
By tens
Any old way is fine
What do you type and ENTER to get a
program to do its stuff?
NEW
*RUN
LOAD
LIST
What will the screen show when you run
this program:
--------------------------
10 PRINT "HELLO"
Nothing
*HELLO
"HELLO"
[The quote marks indicate the
beginning and the end of the STRING,
but are not part of the string.
--------------------------
10 A$ = "HELLO"
20 B$ = "WORLD"
30 PRINT A$;B$
A$;B$
HELLO WORLD
HELLO WORLD
*HELLOWORLD
[The ; connects two print items
without a space between them.
--------------------------
10 A$ = "HELLO "
20 B$ = "DAVE"
30 C$ = A$ + B$
40 PRINT C$
C$
HELLODAVE
*HELLO DAVE
A$ + B$
[The + strings together two strings.
--------------------------
10 X = 1
20 X = X + 1
30 PRINT X;"EQUALS TWO"
X;"EQUALS TWO"
1 EQUALS TWO
*2 EQUALS TWO
ILLEGAL FUNCTION ERROR
[X=X+1 is called "incrementing". The
computer takes the value out of X,
adds 1 to it, and puts the result back
into X.
What are the two parts of a Variable?
High and Low
*Name and Content
Front and Back
[A variable has a name, which can be
one or two letters. A variable holds
something, which is its content.
We use two kinds of variables in
BASIC:
*String and Numeric
Plain and Fancy
Old and New
Constants and Constructs
A String Variable contains:
Twine
Values
*Letters, Numerals, Characters
Hidden Code
A Literal String is marked by what
character at the beginning and the
end?
!
$
*"
@
What kind of variable is: AV$
*String
Numeric
What kind of variable is: G
String
*Numeric
Run this program:
---------------------------
10 A$ = "TEST"
20 A = 12345
30 PRINT A$;
40 PRINT A
ERROR
TEST
12345
*TEST 12345
Nothing
---------------------------
10 X = 1
20 PRINT X;
30 X = X + 2
40 IF X < 10 THEN 20
1 2 3 4 5 6 7 8 9
*1 3 5 7 9
0 2 4 8 10
ERROR
---------------------------
10 X = 5
20 PRINT X;
30 X = X - 1
40 IF X THEN 20
5 4 3 2 1 0
1 2 3 4 5
*5 4 3 2 1
5 3 1
ERROR
[In line 40, if X has any value other
than zero, the program branches to
line 20.
---------------------------
10 FOR X = 5 TO 7
20 PRINT X;
30 NEXT
1 2 3 4 5 6 7
7 6 5 4
*5 6 7
ERROR
---------------------------
10 FOR X = 1 to 10 STEP 3
20 PRINT X;
30 NEXT
*1 4 7 10
1 2 3 4 5 6 7 8 9 10
10 7 4 1
ERROR
---------------------------
10 FOR X = 1 to 7 STEP -1
20 PRINT X;
30 NEXT
7 6 5 4 3 2 1
1 2 3 4 5 6 7
*1
7
[X begins as 1, which is printed. Then
1 is subtracted from X, making it 0,
which is less than 7. The loop ends.
What does this command do?
---------------------------
10 INPUT A$
Puts value in A$ into memory
*Displays a ? and waits for input
Causes an ERROR
---------------------------
10 FOR X = 1 TO 3:READ A$
20 PRINT A$;" ";
30 NEXT
40 DATA"DAVE","BILL","ED"
ERROR
ED BILL DAVE
DAVEBILLED
*DAVE BILL ED
DAVE DAVE DAVE
-------------------------
10 GOTO 40
20 PRINT "TEST 1 ";
30 END
40 PRINT "TEST 2 ";
50 GOTO 20
TEST 1 TEST 2
TEST 2
*TEST 2 TEST 1
TEST 1
---------------------
10 FORX=1TO3:READA$(X):NEXT
20 FORX=3TO1STEP-1
30 PRINT A$(X);" ";:NEXT
40 DATA"DAVE","ED","ZAC"
DAVE ED ZAC
ZAC DAVE ED
ED ZAC DAVE
*ZAC ED DAVE
When you have answered all the
questions correctly, you are no
longer a LAMER! You will become a
Real Computer ADVENTURER!
*True
False
Depends