Kips IT Beans Class 7 Chapter 8 Solutions CONDITIONAL CONTROL STATEMENTS

TextbookKips IT Beans
Class7
SubjectComputer
Chapter8 CONDITIONAL CONTROL STATEMENTS
Other ChaptersChapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 9
Chapter 10
Chapter 11
Chapter 12

Kips IT Beans Class 7 Chapter 8 Solutions CONDITIONAL CONTROL STATEMENTS

Brain Developer

A. Fill in the blanks:

1. A Variable has a unique name, a type, and a size, which is used to identify it in a program.

2. A string variable contains values, Symbols or Text within double quotes.

3. IF-THEN statement is used for making Decisions as well as Comparisons.

4. If the condition specified after IF is true, then the instruction after Then is executed.

5. IF THEN ELSE is a conditional decision making statement.

6. Control statements help to control the flow of a program.


B. State True or False:

1. Constants can change their values during the execution of a program. – FALSE

2. Numeric variable can hold only numbers. – TRUE

3. The condition in IF THEN ELSE statement is given by the logical operators. – FALSE

4. GOTO statement transfers the program control from one statement to another. – TRUE

5. In READ-DATA statement, the data is provided in a program at the time of execution. – FALSE


C. Application Based Questions:

Vishal has created a program in QB64. He wants that the output of the program should be displayed subjected to true and false conditions. Suggest him the appropriate statement.

IF…THEN Statement

Smriti wants to give output of a program in infinite loop. Which statement will you suggest her to use?

Smriti can use GOTO statement for giving output of a program in infinite loop.


D. Multiple Choice Questions:

1. $ sign is used to represent an alphabet in a string.

  • +
  • $
  • ?

2. IF…THEN statement is used for making decision based on comparisons.

  • PRINT
  • INPUT
  • IF…THEN

3. In IF…THEN…ELSE statement, if the condition is False, then the ELSE statement will be processed.

  • ELSE
  • IF
  • THEN

4. GOTO statement is used to transfer the program control from one statement to another.

  • PRINT
  • IF THEN
  • GOTO

5. ELSEIF statement is used when we want to have more choices in the IF… THEN statement.

  • ELSEIF
  • GOTO
  • IF…THEN…ELSE

E. Identify the errors:

IF A=5 RS THEN GOTO START

IF A-S THEN GO TO START or IF A$= “5 Rs” THEN GO TO START

IF A>B THEN PRINT A IS GREATER

IF A>B THEN PRINT “A IS GREATER”

IF A=10A THEN PRINT A$ ELSE PRINT B

IF A=10 THEN PRINT A ELSE PRINT B

IF Y$=”KABIR” THEN GOTO A:OTHERWISE GOTO B:

IF Y$=”KABIR” THEN GO TO A ELSE TO B

IF X=”SUNDAY” THEN PRINT, “HAVE FUN” ELSE PRINT, “FOLLOW THE ROUTINE”

IF X$=”SUNDAY” THEN PRINT “HAVE FUN” ELSE PRINT “FOLLOW THE ROUTINE”


F. Answer the following:

What do you understand by constants and variables?

Constants are the values that do not change during the execution of a program. Constants are of two types: Numeric Constants and Character Constants.
A variable is a named location in the memory of computer that stores data temporarily. A variable has a unique name, a type, and a size that is used to identify it in a program. It can hold one data at a time and can accept different values during the execution of the program. Variables are also of two types: Numeric Variables and String Variables.

Describe the use of Control statements.

The statements that help to control the flow of a program and change the order of execution of statements based upon a given condition are known as Control Statements. There are various control statements in QB64, like IF…THEN, GOTO, IF…THEN…ELSE, etc.

Define IF…THEN statement with the help of an example.

The IF-THEN statement is the most basic type of control statement. It tells the program to execute a set of statements only if the condition evaluates to true. Example: IFX > Y THEN C = C+1 It means that if X is greater than Y, then 1 is added to the value of C.

Briefly explain the conditional statement IF-THEN-ELSE.

IF-THEN-ELSE is a two-way decision making statement. If the condition given after IF part is true, statement(s} specified after THEN gets executed. But if the condition is False, the statements after ELSE part will be processed. Syntax: IF THEN ELSE

Explain the use of END IF statement with the help of an example.

END IF statement is required after the use of multiple line IF, ELSE IF or ELSE statement blocks. It terminates the IF…THEN….ELSE block. It should be written before the END statement.
Example: CLS
INPUT X
IF X > 1 THEN
PRINT “X Is Greater Than 10”
ELSE
PRINT “X Is Not Greater Than 10”
END IF

What is the use of GOTO statement? Explain with an example.

A GOTO statement is referred to as unconditional transfer control. GOTO statement is used to transfer the program control from one statement to another in a program.
Syntax: GOTO
Example: GOTO Start:


Other Chapter Solutions

Leave a comment