wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

BASIC Programming Fundamentals Assessment

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

What is the primary purpose of the REM statement in BASIC programming?

a)

To perform mathematical calculations

b)

To add comments and documentation to the code

c)

To read data from external sources

d)

To print output to the screen

2.

In BASIC, which statement is used to assign a value to a variable?

a)

ASSIGN

b)

SET

c)

LET

d)

VAR

3.

The INPUT statement is used to:

a)

Display data on the screen

b)

Accept data from the user during program execution

c)

Store data in program memory

d)

Write data to a file

4.

What is the correct way to store the value 42 in a variable named X using LET?

a)

X = 42

b)

LET 42 = X

c)

LET X -> 42

d)

LET X = 42

5.

The DATA statement in BASIC is used in conjunction with which other statement?

a)

PRINT

b)

READ

c)

LET

d)

INPUT

6.

Which statement is used to display text or variables on the screen?

a)

DISPLAY

b)

SHOW

c)

OUTPUT

d)

PRINT

7.

What is the purpose of the END statement?

a)

To terminate program execution

b)

To end a loop

c)

To close a file

d)

To clear the screen

8.

In what order are DATA statements read?

a)

Random order

b)

Reverse order

c)

Sequential order

d)

Alphabetical order

9.

Which statement would be most appropriate for adding an explanation of what your program does?

a)

NOTE

b)

REM

c)

COMMENT

d)

DOC

10.

What happens if you try to READ more items than are available in DATA statements?

a)

The program continues with empty values

b)

The program automatically restarts

c)

An error occurs

d)

The previous values are reused

11.

How many times can DATA statements be READ in a program?

a)

Only once unless RESTORE is used

b)

Unlimited times automatically

c)

Three times maximum

d)

Depends on the variable type

12.

The PRINT statement can display:

a)

Only text strings

b)

Only numeric values

c)

Only variables

d)

Both text and numeric values

13.

What is the main difference between INPUT and READ?

a)

INPUT requires user interaction, READ uses stored DATA

b)

INPUT is faster than READ

c)

READ requires user interaction, INPUT uses stored DATA

d)

There is no difference

14.

Which statement would you use to store multiple values that will be used later in the program?

a)

STORE

b)

SAVE

c)

DATA

d)

HOLD

15.

REM statements are:

a)

Executed by the program

b)

Ignored by the program

c)

Required for the program to run

d)

Only allowed at the beginning of the program

16.

The LET statement in modern BASIC is:

a)

Required for all variable assignments

b)

Optional in most versions

c)

No longer supported

d)

Only used with string variables

17.

When using the INPUT statement, what happens if the user enters the wrong type of data?

a)

The program automatically corrects it

b)

An error occurs

c)

The program ignores it

d)

The program terminates

18.

Which statement combination is typically used to read multiple data items?

a)

INPUT and PRINT

b)

READ and DATA

c)

LET and INPUT

d)

PRINT and DATA

19.

In BASIC, the END statement:

a)

Must be the last physical line in the program

b)

Can be placed anywhere in the program

c)

Must have a line number

d)

Can only be used in loops

20.

What happens to REM statements during program execution?

a)

They slow down the program

b)

They are displayed on screen

c)

They are skipped entirely

d)

They are stored in memory