Computer Science
Class-VI
Chapter-9 Qbasic Statements
A. Tick the correct answer:
1. Which of the following functions is used with PRINT staement to display the values in the column indicated in the argument?
a. Enter b. Tab c. None of these
Answer: Tab
2. Which of the following statements displays a question mark after execution of a program?
a. LET b. INPUT c. REM
Answer: INPUT
3. Which of the following key is used for running a QBASIC program?
a. F2 b. F1 c. F5
Answer: F5
4. Which of the following key combinations is used for opening a QBASIC program?
a. Alt+N b. Alt+F c. Alt+P
Answer: Alt+F
5. Which of the following options is used for exiting QBAISC program?
a. Open b. Save c. Exit
Answer: Exit
B. Fill in the blanks with the help of words given in the box:
(Input, Print, Rem, End, QBASIC)
1. ___________ has specific keywords and syntax.
Answer: QBASIC
2.___________ statement is used to display any message or result on the screen.
Answer: Print
3. ___________ statement is used to give comments or remarks in a program.
Answer: REM
4.___________ statement is used to accept the data item from the user and store it in a variable.
Answer: Input
5. ___________ statement is used to indicate the end of a program.
Answer: End
C. Write True or False:
1. Print A will display the value of the variable A.
Answer: T
2. The statement written after REM is ignored by the computer.
Answer: T
3. You can display a message with a variable by using LET statement.
Answer: F
4. The statement written after INPUT is ignored by the computer at the time of execution.
Answer: F
5. End statement is used to print a statement.
Answer: F
D. Match the following:
Column 'A' Column 'B'
1. PRINT i. Used to give comments or remarks in a program
2. LET ii. Used to display a message or result on the screen
3. INPUT iii. Used to assign a value to a variable
4. REM iv. Used to accept the data item from the user and store it in a variable
Answer:
1. ii.
2. iii.
3. iv.
4. i.
E. Answer the following questions:
1. What is the use of sem-colon and comma with the print statement?
Answer:
Print statement with semi-colon: It is used to display the values one after the other on the same line without giving any space.
Print statement with comma: It is used to display the values with more than one space in between.
2. What is the function of REM statement?
Answer: This statement is used to give commentsf or remarks in a program. The statement written after REM is ignored by the computer.
3. Write the use and syntax of GOTO statement?
Answer: GOTO statement tells the computer to go to another place in the program and run the same program or a part of it.
4. How will you open a QBASIC program?
Answer: Steps to open a QBASIC program:
1. Press Alt+F key. The file menu will open.
2. Select the open option.
3. Select the desired program file from the list.
4. Press Enter key.
5. Write the steps for saving a program in QBASIC.
Answer: Steps for saving a program:
1. Click on file menu.
2. Select save as option. Save as dialog box will appear.
3. Type file name.
4. Press enter key or OK option.
Some Other Links:
No comments:
Post a Comment