Chapter :- 7 Introduction to QBasic
Chapter :- 7 Introduction to QBasic
Buzz Keyword
1.Computer Program: It is a list of instructions that tell the computer what to do.
2.BASIC: It is the short form of Beginners all Purpose Symbolic Instruction Code.
3.Constants: Data whose value does not change or remains fixed during the execution of the program.
4.Variable: A name that represents location in the computer’s memory, which stores the values.
5.Arithmetic Operators: These are used to perform mathematical operations like addition, subtract etc.
6.Relational Operators: These are used to compare two values.
7.Logical Operators: These work on logical conditions.
8.CLS: This stands for Clear Screen.
9.REM: It is used to input a remark or a comment into the program code.
10.Print: PRINT statement is used to display the output of the program.
11.END: The END command indicates the end of the program.
Fill in the blanks.
1. A Computer program is a list of instructions that tell the computer what to do.
2. BASIC was developed by John G Kemeny and Thomas E Kurtz
3. The Immediate Window in QB64 is denoted by Status
4. The QB64 file is saved with the extension .bas
5. The Mod operator returns the remainder after division.
6. PRINTStatement is used to display the output of theprogram.
State whether True or False.
1. To execute a QB64 program we press F6 from the keyboard. False
2. QBASIC was developed by Microsoft Corporation. True
3. Character constants can be used for mathematical calculations. False
4.Logical operators produce the result as True or False. True
5.CLS is used to clear the output screen. True
Multiple choice questions.
1. Data is of two types
(i) Constants, Variables
(ii)Real number , Decimal number
(iii) Strings, Alphabets
(iv) Alphabets, Variables
2.The two major parts of the QB64 window are
(i)Program window, Code Window
(ii) Code Window, Error Window
(iii) Program window, Immediate Window
(iv) Code Window. Help window
3. The expression. 2+6 3/2-4 will produce the result
(i)6
(ii)7
(iii)8
(iv)9
4. The three types of operators are
(i)Mathematical, Arithmetic, Logical
(ii)Character, Logical, Arithmetic
(iii)Relational, Arithmetic, Character
(iv)Relational, Logical, Arithmetic
5.This command is used to input a comment into the program code
(i)PRINT
(ii)REM
(iii)CLS
(iv) END
Match the following.
Answer briefly.
1. Name the three types of operators.
Ans :- Arithmetic Operators, Relational Operators and Logical Operators
2. Define Constants and Variables.
Ans :- Data whose value does not change or remains fi xed during the execution of the program are constants. Variable is a name that represents location in the computer’s memory, which stores the values.
3. How is the Status Area useful?
Ans :- The Status Area suggests the syntax for keyword entries and gives the compiler status when compiling. If there will be any error in the program, the line will be highlighted in red colour and the error will be displayed with line number in the Status Area.
4. What is the REM statement used for?
Ans :-REM statement is used to input a remark or a comment into the program code
5. How do CLS and END statements work?
Ans :- This stands for CLEAR SCREEN and is used to clear the output screen. The END command indicates the end of the program.
6. How will you differentiate between a Numeric variable and a String variable?
Ans :- String variables always end with the dollar ($) sign.
Answer the following.
1.Discuss the features of QB64.
Ans :- Supports full graphic functions for images up to 32 bit colour. Instant loading of image files including BMP, PNG, JPEG, GIF, etc. Supports stereo sound fi les like WAV, OGG, MP3, speaker and volume control. Animation is easy to create
2. Write the types of Constants.
Ans:-Numeric Constants and Character Constants
3. Explain Logical Operators.
Ans :- These operators work on Logical conditions. Logical operators and relational operators are used together to form a complex condition. They produce the result as True or False.
4. How is the execution of program using F5 different from F5+Ctrl?
Ans :-F5: The output window is attached with the QB64 window; if you want to make changes in the Program window the output window needs to be closed.
Ctrl + F5: The output window is detached from the QB64 window. We can make changes in the program code, while the output window is still open.
5. List the precedence of operators in QB64.
Ans :- (), ^, /, *, +, – in descending order..
6. In what different ways can we use the PRINT statement?
Ans :- PRINT statement is used to display the output of the program. To display any message enclose it in double quotes, i.e., (“ ”) and to display the value of any variable write the variable name without the quotes..
Popular Videos
UX for Teams
Learn the basics and a bit beyond to improve your backend dev skills.
Designer
SEO & Instagram
Learn the basics and a bit beyond to improve your backend dev skills.
Designer