Page 112 - TechPluse_C7_Flipbook
P. 112
Restart
Decision making in BASIC-256 is done by conditional statements or decision-making
statements which decide the direction of the flow of program execution.
The IF-THEN statement is the simplest conditional statement.
The IF-THEN-ELSE statement checks for a condition. If the condition evaluates to true, the
indented statements following the if statements are executed, otherwise the indented
statements following the else statement are executed.
The statements used to repeat a set of instructions in a program are called iterative
statements or looping statements.
Checkpoint
A. Tick ( ) the correct option.
1. Which of the following is not a conditional statement in BASIC-256?
a. IF-THEN c. IF-THEN-ELSE
b. FOR-NEXT d. WHILE
2. What does a loop do?
a. Repeats a section of code c. Chooses a path to take
b. Sets a variable name d. Print Hello
3. In the given statement, what is i?
FOR i = 1 TO 100
a. Branch c. Counter variable
b. Condition d. Property
4. What will be the output of the following program?
FOR i = 10 TO 1 STEP - 4
PRINT i; " ";
NEXT i
a. 1062 c. 10 6 2
b. 2610 d. 10
110 Premium Edition-VII

