Page 113 - TechPluse_C7_Flipbook
P. 113

B.   Fill in the blanks using the words given below:

                                        Hints


                                            startNumber,   counter,   endNumber,   control statement


                       1.   The conditional statements in BASIC-256 are also called .........................

                       2.     The ........................ is starting number of the loop and the ........................ is the total number of
                            times the loop must run.

                       3.     The  .......................... is a variable  that  keeps count of the number of times  the instructions
                            inside the loop have been executed.
                 C.   Write 'T' for true and 'F' for false.


                       1.   The IF-THEN statement is the simplest conditional statement.                  .......................
                       2.     The statements used to repeat a set of instructions in a
                            program are called iterative statements or looping statements.                .......................

                       3.   While loop is a replacement of the If…Then statement.                         .......................

                       4.   BASIC-256 provides two types of looping statements
                            FOR...NEXT and IF-THEN.                                                       .......................
                 D.   Short answer type questions.

                       1.   When is the IF-THEN-ELSE statement used?

                            ...........................................................................................................................................................................
                       2.   Write the syntax of the IF-THEN  and IF-THEN-ELSE statements.

                            ...........................................................................................................................................................................

                       3.   Consider the given program and answer the following questions:

                            sum = 0

                            FOR N = 1 TO 30 STEP 3
                            sum = sum + N

                            NEXT N

                            PRINT "sum = " + sum
                            a.  How many times the above loop will run?        ............................................................................

                            b.  What will be the output of the above program? ............................................................................

                 E.   Long answer type questions.

                       1.   Draw the flowchart for IF-ELSE statement.

                       2.   What is looping? What are the two looping statements used in BASIC-256?



                                                             Conditional and Looping Statements in BASIC-256         111
   108   109   110   111   112   113   114   115   116   117   118