Class 7 : CHAPTER 8. GRAPHICS IN QBASIC

DESCRIPTIVE TYPE QUESTIONS :

1. What is the use of INPUT statement ?

Ans. INPUT statement is used to enter the values ( text or number ) while the program is being executed. This command waits for the user to enter the information and then assigns the values accordingly .

For Eg :               INPUT A

                             INPUT  “ ENTER A NUMBER “ ; A

2. What is the difference between IF…THEN and IF…THEN…ELSE statements ?

Ans. IF…THEN is a conditional decision making statement that does a  task specified after THEN if the condition is TRUE otherwise goes  to the NEXT LINE in the program.

          For Eg:  IF A>100 THEN GOTO 60

 IF…THEN…ELSE is a conditional decision making statement that does  a task specified after THEN  if the condition is TRUE otherwise do another task specified after ELSE.

          For Eg: IF A>100 THEN GOTO 40 ELSE GOTO 60

3. What do you understand by the term Screen modes ?

Ans.  Screen mode refers to the screen resolution in QBasic Output window. The default  screen mode is Screen 0 . It displays only text. It is not used for Graphics. To use Graphics we can use other screen modes like Screen 7 , Screen 9 , Screen 12 and Screen 13.

4. How can we draw a rectangle ? Explain with an example.

Ans. The LINE statement is used to draw a rectangle .

 The option B with LINE statement is used to draw a Rectangular Box without any fill .

For Eg : LINE ( 60 , 60 ) – ( 130 , 100 ) , 6 , B

The option BF with LINE statement is used to draw a Rectangular Box filled with a colour.

For Eg : LINE ( 60 , 60 ) – ( 130 , 100 ) , 6 , BF

Here , ( 60 , 60 ) and ( 130 , 100 ) indicates the co-ordinates of the top-left corner and bottom-right corner of the rectangle respectively and 6 indicates the colour.

5. What is the use of PSET statement ?

Ans. PSET statement is used to set a fixed point on the screen from where we can start a drawing .

For Eg : PSET ( 80 , 80 ) sets the point at (80 ,80) before starting a drawing.

Leave a comment