Kips Class 6 IT Beans Chapter 12 QB64 Statements

Chapter 12 QB64 Statements

Brain Developer
A. Fill in the blanks
1. By using semicolon in a PRINT statement, the items are printed without any space between them.
2. TAB statement prints tabular type of results.
3. INPUT statement instructs the computer to wait for some data to be entered.
4. CLS command clears all the contents of the screen.
5. The INPUT statement displays a Question mark on the screen.
6. The INPUT program can be given with both numeric and alphanumeric variables.

B. State True or False
1. The PRINT statement provides variations to print the output on the screen. (True)
2. When comma is used with PRINT statement, the items are displayed close to each other without spaces. (False)
Correct Answer:
When semicolon is used with PRINT statement, the items are displayed close to each other without spaces.
3. The “redo from start” message is displayed if the value of a defined variable is incorrect. (True)
4. While using INPUT statement, the punctuation between the message and the variable is a colon. (False)
Correct Answer:
While using INPUT statement, the punctuation between the message and the variable is a semicolon.
5. The INPUT statement is used to assign values to variables. (False)
Correct Answer:
The LET statement or Assignment statement is used to assign a value to a variable.
6. When INPUT statement is executed, the ‘’ symbol is displayed. (True)
7. You can have only one INPUT statement in a program. (False)
Correct Answer:
You can have more than one INPUT statement in a program.

C. Application Based Questions
1. Vishal has created a program in QB64. He wants that the output of the program should be displayed leaving the number of spaces between the values. The variables to be displayed are N$, M$ and Total. Suggest him the appropriate Print command.
Answer:
PRINT N$, M$, Total

2. Smriti wants that the program which she is writing should wait for user to key in his response. Which statement will you suggest her to use
Answer:
She should use INPUT to wait for user to key in his response.

D. Multiple Choice Questions
1. _______________ command helps to insert comments that enable us to understand what the program is all about.
a) LET
b) REM
c) CLS
Answer:
b) REM

2. The ___________________ statement is used to accept the data item from the user.
a) Output
b) Input
c) LET
Answer:
b) Input

3. __________________ statement can be used in controlling column location.
a) Print
b) Tab
c) Print Tab
Answer:
c) Print Tab

4. In QB64, whenever any item is enclosed in the ____________________ it means it is optional.
a) Curly brackets
b) Square brackets
c) Rounded brackets
Answer:
b) Square brackets

5. _________________ statement stops further the execution of the program.
a) PRINT
b) INPUT
c) LET
Answer:
b) INPUT

E. Identify the errors and re-write the statements
1. INPUT“Enter the name of the article; N$”
Answer:
INPUT“Enter the name of the article”; N$

2. LET A=“Aarav”
Answer:
LET A$=“Aarav”

3. INPUT“Enter total marks”,M.
Answer:
INPUT“Enter total marks”;M

4. PRINT Marks = M
Answer:
PRINT“Marks =”; M

5. Let X = “MY NAME IS KABIR”
Answer:
LET X$ = “MY NAME IS KABIR”

F. Write QB64 statements for the following
1. To add values of X and Y and store the sum in Z.
Answer:
Z = X + Y

2. Increase the value of A by 10 and store in A.
Answer:
A = A + 10

3. Store the name Abhinav in the variable A$.
Answer:
A$ = “Abhinav”

4. Multiply two variables A and B and store the result in C.
Answer:
C = A*B

5. To print your name and surname without leaving any space between them.
Answer:
PRINT “WINNIE”; “POOH”

6. To accept the data item for the variables, Marks with the message, during the execution of a program.
Answer:
INPUT“MARKS”; M

G. Answer the following
1. What is the use of INPUT statement What does a computer do when we use INPUT statement
Answer:
The INPUT statement is used to accept a data item from the user and store it in a variable. While using INPUT statement, the computer performs the following tasks
→ It stops further execution of the program and prints a question mark on the screen.
→ It waits for the user to key in its response and press the Enter key.
→ It stores or assigns the same data item into the corresponding variable mentioned in the INPUT statement.

2. What is the use of PRINT statement using TAB function
Answer:
The TAB function is used to move the print position to the column indicated in its argument. This statement is quite suitable for printing tabular type of results. PRINT TAB statement can be used in controlling column location.

3. Differentiate between the use of PRINT statement with comma and semicolon by using examples.
Answer:

→ PRINT statement with comma
PRINT with comma is used to display values one after another with plenty of spaces (normally 14) in between. Only five values can be printed in one line. In case of more than 5 values, the remaining values will be printed on the next line. Example PRINT Ramu, Mofta
→ PRINT statement with semicolon
PRINT with semicolon is used to display the values one after another, without any space in between. Example PRINT “RAMU”, “MOFTA”

4. What is the use of Assignment statement
Answer:
The LET statement or Assignment statement is used to assign or give a value to a variable. Example LET A = 13 will assign value 13 to variable A.

5. When does the “redo from start” message get displayed on the screen
Answer:
If the value entered during execution of a program does not match with the type of variable given in the program, then the “redo from start” message is displayed on the graphic screen. It means that you have to re-enter all the values.


No comments:

Post a Comment

Also read!

Class 6 Solutions

• Class 7

Class 7 Computer Kips Solutions
Class 7 Gul Mohar English Solutions
English Grammar Class 7
English Writing Skills Class 7
Class 7 Map Pointing Solutions
Class 7 NCERT Civics Solutions
Class 7 NCERT Civics Notes
Class 7 NCERT Civics Extra Questions
Class 7 NCERT Geography Solutions
Class 7 NCERT Geography Notes
Class 7 NCERT Geography Extra Questions
Class 7 NCERT History Solutions
Class 7 NCERT History Notes
Class 7 NCERT History Extra Questions
Class 7 NCERT Maths Solutions
Class 7 NCERT Science Solutions
Class 7 NCERT Science Notes
Class 7 NCERT Science Extra Questions

• Class 8

Class 8 Kips Artificial Intelligence Solutions
Class 8 Gul Mohar English Solutions
English Grammar Class 8
English Writing Skills Class 8
Class 8 Map Pointing Solutions
Class 8 NCERT Civics Solutions
Class 8 NCERT Civics Notes
Class 8 NCERT Civics Extra Questions
Class 8 NCERT Geography Solutions
Class 8 NCERT Geography Notes
Class 8 NCERT Geography Extra Questions
Class 8 NCERT History Solutions
Class 8 NCERT History Notes
Class 8 NCERT History Extra Questions
Class 8 NCERT Maths Solutions
Class 8 NCERT Science Solutions
Class 8 NCERT Science Notes
Class 8 NCERT Science Extra Questions
Class 8 NCERT Science Exemplar
Class 8 NCERT Science MCQs

• Class 9

Class 9 Kips Artificial Intelligence Solutions
Class 9 Map Pointing Solutions
Class 9 NCERT Civics Solutions
Class 9 NCERT Geography Solutions
Class 9 NCERT History Solutions
Class 9 NCERT Maths Solutions
Class 9 NCERT Science Solutions

• Class 10

Class 10 Kips Artificial Intelligence Solutions
Class 10 NCERT English Solutions
→ Class 10 Map Pointing Solutions
Class 10 NCERT Civics Solutions
Class 10 NCERT Civics Notes
Class 10 NCERT Civics Extra Questions
Class 10 NCERT Geography Solutions
Class 10 NCERT Geography Notes
Class 10 NCERT Geography Extra Questions
Class 10 NCERT History Solutions
→ Class 10 NCERT History Notes
Class 10 NCERT History Extra Questions
Class 10 NCERT Maths Solutions
Class 10 NCERT Science Solutions
Class 10 NCERT Science Notes
Class 10 NCERT Science Extra Questions

• Computer languages
Python Basics

• Extra Activities
Extra Activities

• Extra Knowledge
Extra Information
General Knowledge
Historical Places in India
Latest technology
Physical Sciences
Facts (Animals)
Facts (Extra)

• Mathematics quick links
Cubes of numbers
Squares of numbers
Mathematical Terms
Maths Tricks