Computer Science
Class-VII
Chapter- 10 QBASIC - Graphics and Sound
Section-1
A. Answer these questions orally:
1. How does the resolution of the screen is measured?
Answer: Resolution of the screen is measured in terms of the pixels present on a screen.
2. What are the two types of screen modes?
Answer: The two types of modes are text mode and graphic mode.
3. Why do you use PSET command?
Answer: The PSET command is used to display pixels on the screen. PSET command is effective only after you have give SCREEN command.
B. Tick the correct option:
1. A ____ is the smallest possible element of an image on the screen.
a. pixel b. axle c. nut d. bolt
Answer: Pixel
2. All the graphic commands can be used only after the ____ command is used.
a. PSET b. LINE c. CIRCLE d. SCREEN
Answer: SCREEN
3. Graphic mode, however, can display both graphics and:
a. text b. papers c. books d. board
Answer: TEXT
Section-2
A. Fill in the blanks:
1. ___ and _____ are the two modes of screen in QBASIC.
Answer: Text, Graphics
2. There are total of ____ colours to be used with COLOR command.
Answer: 16
3. ____ command produces sound of a specific frequency for a specific duration from the PC speaker.
Answer: Sound
4. _____ and ____ can be drawn by using LINE command.
Answer: Line, Square
5. ____ and _____ are the two parameters used with SOUND command.
Answer: 'f', 'd'.
B. Match the following:
1. SCREEN 0 A. PRODUCES SOUND
2. COLOR 4 B. SETS THE COLOR OF THE PIXEL
3. PSET COMMAND C. SETS THE COLOR TO RED
4. SOUND 20,5 D. DRAWS A BOX OR LINE
5. LINE COMMAND E. CHANGES TO TEXT MODE
Answer:
1. e
2. c
3. b
4. a
5. d
C. What do the following commands do? Write an example of each. Can these be used with the SCREEN mode 0?
1. BEEP 2. LINE 3. COLOR 4. SOUND
5. PSET 6. PAINT
Answer:
1. Beep: The Beep command produces a beep sound that lasts for about half a second.
2. Line: Line command is used to draw a line between two specified coordinates.
3. Color: Color command is used to change the color of the screen and the text.
4. Sound: QBASIC facilitates your working by creating and playing various sound effects.
5. PSET: The PSET command is used to display pixels on the screen.
6. Paint: Paint command is used to paint a particular point with the specified color.
D. Answer the following questions:
1. Why is graphics not an important feature in QBASIC?
Answer: Because QBASIC was not intended to be used for graphics based programming. It needs to be understood that QBASIC was created by Microsoft when it has launched MS DOS, which had just command line interface. Also the BASIC language had no graphics commands or they were very rudimentary if present.
2. Explain the use of SCREEN command in QBASIC.
Answer: To create graphics in QBASIC, you must first know the screen command. All the graphic commands can be used only after the SCREEN command is used.
3. When do you use COLOR command? How many colors can be used in QBASIC?
Answer: COLOR command is used to change the color of the screen and the text. You have to specify a color number which will be followed by the text in the PRINT statement.
4. What is a pixel? Explain.
Answer: The smallest possible element of an image on the screen.
The computer screen that you see consists of hundreds of picture elements known as pixels. In other words, a pixel is the smallest possible element of an image of the screen.
5. What is the difference between a LINE command and a CIRCLE command?
Answer: Line command is used to draw a line between two specified coordinates.
Circle command is used to draw a circle of a specific radius at given coordinates. This command will be effective only after using the screen command to get the display in graphics mode.
No comments:
Post a Comment