Tuesday 24 July 2018

Class 7 - Revision

QBASIC
Revision :

There are 3 types of character sets : 
Alphabets
Numbers
Special Characters.

Operators:
Arithmetical Operators
Relational Operators
Logical Operators

In arithmetical operators learn the various symbols you use in QBASIC. Because some symbols in computers are different from symbols in Maths like multiplication, division.
You should be able to write the corresponding QBASIC expression for the given Mathematical expression.

e.g:

         4ABC = 4 *A* B*C

In relational operators , learn all the symbols. You should be knowing it gives the answer either in True or False.

e.g:

      X = 5 , Y =8 
(X > 5) will give False 

(Y < >10) will give True

In Logical Operators you should be familiar with the truth tables.

A = 3 , B= 6 and C=10

(A > B) AND (C < 100)
A>B is false so the answer is false.

You should also know how to convert a given instruction into a QBASIC instruction.

e.g:

The sum of a and b  is less than the product of a and b.
          (a + b) < ( a *b)

In the second unit Constants and Variables , 

You should be familiar with the rules for writing the variables and constants.

Numeric variable will store Numeric Constant.
Alphanumeric variable will store alphanumeric Constant.

You cannot mix up the constants and variables.
                                 Numeric variable = Numeric constant
                                             E = 20
                         Alphanumeric variable = Alphanumeric constant
                                           G$ = "Class"

Remember variable on the left hand side and constant on the right hand side.
                               A = 100
In alphanumeric variable , there should be a $ in the end.
Alphanumeric constant should be within double quotation.

                               B$ = " Computer Science"
                               D1$ = " Bond 007"
You should know how to write valid valid(correct) variables for the given constans.

e.g:

                      ------------ = " Rain"
              Here write any valid alphanumeric variable. Because on the right hand side "Rain" is the alphanumeric constant. (Remember double quotation means alphanumeric )
                      W$ = "Rain"

                     --------------- = 7.8
            
              Here write any valid numeric variable. Because on the right hand side 7.8 is the  numeric constant. 
                     
                        B = 7.8

No comments:

Post a Comment