Digital Learning

Monday, February 28, 2022

CBSE Computer-Science Class-VI (Solved Exercise-9):

Computer Science
Class-VI
Chapter-9 Introduction to QBASIC 

Section-1

A. Answer these questions orally:
1. What are syntax rules?
Answer: BASIC has some rules which you need to follow while writing computer programs. These rules are known as syntax rules of the language.

2. What is the function of REM command?
Answer: This keyword is a short form of the word Remark. This keyword is used to write some notes in the program.

3. How do you save your program?
Answer: Steps to save a program:
1. Click on file menu.
2. Click save as option.
3. Type file name
4. Click OK 

4. What do you know about variables?
Answer: We need memory locations where the computer can store data values that can change or vary. These memory locations are called variables.

B. Tick the correct option:
1. QBASIC statement consists of:
a. keywords        b. operators        c. expression        d. all of these
Answer: All of these

2. Numbers within quotation marks can:
a. not be used for calculation    b. be used for calculation    c. be treated as number entry        d. none of these
Answer: not be used for calculation

3. Which is a correct statement?
a. Let A%=10        b. Let A$=10    c. Let 5A=10        d. Let-A=10
Answer: Let A%=10

Section-2

A. Fill in the blanks:
1. ______ have a specific meaning in that language.
Answer: Keywords

2. The ______ command clears the output scree.
Answer: CLS

3. A program can be executed using_______ key.
Answer: F5

4. Program in QBASIC is saved with _____ extension.
Answer: .bas

5. ______ statement asks to enter value for the variable.
Answer: LET & INPUT

B. State True or False:
1. Value in a variable remains fixed during the program execution.
Answer: T

2. % sign is used with variable name to store long integer.
Answer: F

3. Spaces are not allowed in variable name.
Answer: T

4. LET statement can store value in a variable during run time.
Answer: T

5. To run a program click START option in RUN menu.
Answer: T

C. Answer the following questions:
1. Write full form of QBASIC.
Answer: Quick Beginners All Purpose Symbolic Instruction Code.

2. How many types of variable are there in QBASIC?
Answer: There two types of variables in QBASIC.
1. Integer Variable
2. String Variable

3. Which command is used to display output?
Answer: Print keyword is used to write something on the screen. If you want to write any message on the screen, type PRINT followed by your message within double quotes.

4. What are the rules for writing QBASIC program?
Answer: 
1. All the statements in a QBASIC program should appear in a proper sequence.
2. Each statement should appear in a separate line.
3. Each statement should have a keyword in it.
4. Syntax rules should be strictly followed.

5. What is the difference between LET and PRINT statement?
Answer: LET statements are used to store values in a variable.
PRINT statement gives results of the program on output screen.

6. What are the rules for naming variables in QBASIC?
Answer: Rules for naming variable are:
1. Variable name always starts with an alphabet.
2. It should not be a QBASIC keyword.
3. It should not have a space in it.
4. Special characters except $, %, &, # are not allowed.


No comments:

Post a Comment