Skip to main content

Bit by Bit | Chapter 5 Looping Statements in QB64 | Class 7 CBSE | Computer Application

Solved Question and Answer of Bit by Bit Chapter 5 Looping Statement in QB64




A. Tick the correct option –

1. (a) LET

2. (c) FOR … NEXT

3. (a) FOR

4. (a) FOR

5. (b) DO UNTIL … LOOP

6. (d) GOSUB

B. Fill in the blanks –

1. Loop

2. For Next

3. Counter

4. Outer

5. DO WHILE …. LOOP

6. FOR, DO

C. State True or False –

1. F

2. F

3. F

4. T

5. T

6. F

D. Answer the following questions

1. What is Loop? Name the looping statements used in QB64.

A loop is used to repeat a block of statement or statements. FOR … NEXT, WHILE … WEND and DO … LOOP are three looping statements in QB64.

2. What is the use of step value in a FOR … NEXT loop?

By default the NEXT statement increases the value of the control variable by 1, but we can increase or decrease the value as per our choice using STEP statement.

3. What is the difference between DO WHILE … LOOP and DO UNTIL … LOOP?

The DO WHILE … LOOP is executed as long as the specified condition is TRUE while in DO UNTIL … LOOP, the execution of the loop continues as long as the condition is FALSE.

4. Describe the term nested loop.

When the loops are used within another loop, this is known as nested loops. This nested loops can be used any of the loop like for loop can be used in while loop or while loop can be used in while loop, etc.

5. What is the function of GOSUB statement?

The function of GOSUB statement enables you to jump to any location in the program. Labels are used to specify at what point in the program to continue execution.

6. Give the significance of EXIT DO and EXIT FOR statement.

You can exit from a loop before it comes to an end on its own, for this you have to use EXIT command. EXIT FOR is used in FOR LOOP whereas EXIT DO is used in DO WHILE or DO UNTIL … LOOP.

 




Comments

Popular posts from this blog

Q & A Chapter 1 | Internet Basics | Class 10 CBSE | Computer Application

 Q & A of Chapter 1 Internet Basics A. Tick the correct options – 1. (b) TCP/IP 2. (a) Internet Service Provider 3. (a) URL 4. (b) HTTP 5. (a) Bridge 6. (a) home page 7. (d) All of these 8. (b) Domain Naming System 9. (b) Rules 10. (d) ARPANET B. Very Short Answer Type Questions – 1. In the URL http://www.myfirm.co.in/about.html , what do the following components depict? (a) http                                                 (b) in (a) Http represents a type of server and the protocol on the Internet (b) ‘in’ represents the domain extension of the website. 2. In the URL http://www.favmusic.com/contactus.html what does www.favmusic stand for? www.favmusic represents the domain name i.e. favmusic in www. 3. W...

Create Composite Key in SQL

What is a composite key? A composite key in SQL can be defined as  a combination of multiple columns , which are used to identify all the rows involved uniquely. Even though a single column can't identify any row uniquely, a combination of over one column can uniquely specify any record. How to create a composite key? EG: