Digital Learning

Friday, January 5, 2024

Computer-Science Class-7 Exercise-10(2023-24):

Computer Science
Class-VII
Chapter-10 Qbasic

A. Tick the correct answer:
1. String variable stores____________________ characters.
a. alphanumeric            b. numeric                c. constant                d. command
Answer: Alphanumeric
2. PLAY command plays one _______________ at a time.
a. variable                       b. note                        c. song                        d. constant
Answer: Note
3. PLAY command can play a complex stored__________________________.
a. note                              b. variable                 c. song                         d. numeric
Answer: Song
4. The SOUND command produces sound of a specific_________.
a. variable                       b. note                         c. duration                d. frequency
Answer: Frequency
5. Nested loop is a loop within a ______________________.
a. loop                              b. variable                   c. command             d. stirng
Answer: Loop
6. There must be a screen command declared to use_______________.
a. LINE                             b. PAINT                      c. CIRCLE                   d. COLOR
Answer: PAINT
7. QBASIC stands for Quick Beginners All purpose ___________ instruction code.
a. String                            b. Song                         c. Symbolic               d. Screen
Answer: Symbolic

B. Fill in the blanks:
1. QBASIC is one of the versions of _______________.
Answer: BASIC
2. _______________________ are the data of values in a program.
Answer: Constants
3. An __________________ data enclosed in double quotes is called string constant.
Answer: Alphanumeric
4. All positive and negative and decimal numbers are _____________ constants.
Answer: Numeric
5. QBASIC has a ___________________ statement that allows us to draw circles.
Answer: Circle
6. The____________ command plays music.
Answer: Play
7. The _____________ number specifies the color to paint with.
Answer: Color


C. Write true or false:
1. Only one sound can be played at a time.
Answer: T
2. Variables store data temporarily.
Answer: T
3. Line command displays a circle.
Answer: F
4. In amost all cases, we will need to use the border color parameter.
Answer: T
5. Once we have entered 0, the program ends.
Answer: T
6. The SELECT CASE statements run faster than the IF statements.
Answer: T
7. A value of variable can be changed due to the execution of the programs.
Answer: T



D. Answer the following questions:
1. Name any four programming languages.
Answer: BASIC, FORTRAN, PASCAL, C, C++, JAVA etc.
2. What are constants?
Answer: Constants are the data of values in a program that may be letter, number or special characters. There are two types of constants: String constant and Numeric constant.
3. What are the two types of consonants? Explain.
Answer: There are two types of constants: String constant and Numeric constant.
String constant: An alphanumeric data enclosed in double quotes is called string constant.
Numeric constant: It is number with or without decimal point that is not enclosed inside double quotes.
4. What are variables? Explain i  brief.
Answer: A variable is a symbolic unique name that occupies space in the computer memory to store data temporarily.
5. How can we insert sounds in QBASIC?
Answer: The sound command produces sound of a specific frequency for a specific duration. Syntax to insert sounds in Qbasic:
Syntax:
SOUND f,d
f- Frequency in Hertz
d- Duration in ticks
6. What is a SELECT CASE? Explain in brief.
Answer: SELECT CASE statements also work like IF statements. The difference is that the Select case statement can make the code simpler to read and work with than the IF statements.
7. What are loops? In how many ways they can be repeated? Explain with example.
Answer: Looping is used to have the computer do repetitive tasks in a period of the time that would be otherwise be required. Loops can repeat in two ways:
A specific number of times.
Until a certain condition is met.

No comments:

Post a Comment