BASIC programming 2 - JSS2 Computer Studies Past Questions and Answers - page 1

1

What does the REM statement in BASIC programming primarily serve?

A

Repeat a set of statements

B

Declare variables

C

Initialize the program

D

Display program output

correct option: c
Users' Answers & Comments
2

In BASIC, how are variables declared and assigned initial values?

A

Using the DECLARE statement

B

With the VAR keyword

C

Implicitly without declaration

D

Through the INIT statement

correct option: c
Users' Answers & Comments
3

Which BASIC statement is used to display output to the user?

A

PRINT statement

B

DISPLAY statement

C

OUTPUT statement

D

SHOW statement

correct option: a
Users' Answers & Comments
4

What does the INPUT statement in BASIC allow?

A

Displaying program output

B

Declaring variables

C

User input

D

Initializing the program

correct option: c
Users' Answers & Comments
5

How is a BASIC program typically concluded?

A

Using STOP statement

B

Through FINISH statement

C

With END statement

D

By using CONCLUDE statement

correct option: c
Users' Answers & Comments
6

Explain the purpose and functionality of the PRINT statement in BASIC programming. Use the following code for an illustration:

A = 10
B = 5
SUM = A + B
PRINT "The sum of A and B is "; SUM

The PRINT statement in BASIC serves the purpose of displaying output to the user. It allows programmers to present calculated values, messages, or any relevant information on the screen.

In this example, the PRINT statement communicates the result of the addition operation to the user, enhancing the user experience and making the program informative. It is a fundamental tool for conveying information in BASIC programming.

Users' Answers & Comments
7

Explain the significance of program initialization in a BASIC program and how it can contribute to program readability.

Program initialization, often started with REM statements, adds comments or information about the program, enhancing its readability by providing insights into the code's purpose or specific details.

Users' Answers & Comments
8

Discuss the role of variable declaration in BASIC programming and why explicit specification of variable types is not required.

Variable declaration in BASIC involves declaring variables and assigning initial values without specifying types explicitly due to its dynamically typed nature, allowing flexibility in variable usage without predefined data types.

Users' Answers & Comments
9

Describe the purpose of executable statements in a BASIC program and provide examples of actions that can be performed using these statements.

Executable statements in a BASIC program define the logic and functionality, allowing actions such as arithmetic operations, conditional statements, and loops to be performed, shaping the behavior and outcome of the program.

Users' Answers & Comments
10

Examine the optional nature of user input in BASIC programming and explain the conditions under which the INPUT statement is utilized.

User input using the INPUT statement in BASIC is optional and depends on the program's nature; it is employed when the program requires user-provided values, allowing for interactivity and customization based on user input.

Users' Answers & Comments
Recommended: JSS2 Computer Studies Lessons
Please share this, thanks: