Bit by Bit | Chapter 6 - Graphics and Sound in QB64
A. Tick the correct option.
1. (d) screen mode 0
2. (b) 640 x 350
3. (d) White
4. (a) Lower-Right
5. (c) PSET
6. (c) Generate a tone for a short duration
B. Fill in the blanks.
1. CIRCLE
2. PAINT
3. PLAY
4. Graphic
5. Pixels
6. Box
C. True or False.
1. True
2. False
3. False
4. True
5. True
6. True
D. Answer the following questions.
1. What is the use of SCREEN statement?
The SCREEN statement is used to set the screen mode for displaying graphics. There are many screen modes and each screen modes have their own number which is from SCREEN 1 to SCREEN 13. The various screen modes differ in resolution.
2. What is a pixel? How is it related to resolution?
The graphics which is displaying on the computer screen is made up of thousands of dots called pixel. Pixel stands for picture element. The number of pixels in an image determines the resolution of the image. Higher the resolution, cleaner the image will appear.
3. What is the difference between COLOR and PAINT statement?
The COLOR statement is used to change the colour of the text and background of the screen while PAINT statement is used to fill a closed area with colour.
4. What is the use of SOUND statement?
The SOUND statement allows you to play a musical note.
5. Explain LINE and CIRCLE statements with the help of examples.
The LINE statement is used to draw a straight line between two points (pixels), while the CIRCLE statement is used to draw a circle, ellipse or an arc of a circle.
Example to draw line -
LINE (100,50) - (150,50), 3
In the above example (100,50) shows the co-ordinate of first point and (150,50) shows the second co-ordinate or second point, and LINE statement is joining these two co-ordinate or points. 3 denotes the colour of the line
Example to draw a circle -
CIRCLE (100,100), 30, 3
In the above example (100,100) shows the center point of the circle and 30 is the radius of the circle which is given in pixels. 3 denotes the colour of the circles border.
6. What is the use of PSET statement?
The PSET statement is used to display a pixel on the screen. PSET stands for Point Set.
Playlist Link of QBasic Video File - Click Here
Comments
Post a Comment
Students you can ask your doubts in comment section