## Fill in the blanks

#### Question 1

Alphanumeric variables always end with a * dollar ($)* sign.

#### Question 2

* Numeric* constants include only numbers.

#### Question 3

The maximum length of a variable is * 12*.

#### Question 4

* Alphanumeric* constants are always enclosed in double quotes.

#### Question 5

Variables always begin with * alphabets*.

#### Question 6

Comma is not allowed while writing * numeric* constants.

## State whether the following statements are True/False

#### Question 1

A45 is a valid numeric variable.**True**

#### Question 2

A+B is not a valid alphanumeric variable.**True**

#### Question 3

Special characters are used in variables.**False**

#### Question 4

Numeric constants are stored in numeric variables.**True**

#### Question 5

0.5495 is a valid numeric constant.**True**

#### Question 6

Decimals are not allowed in numeric constants.**False**

## Match the following

#### Question 1

S. No | Column 1 | Column 2 |
---|---|---|

1 | Numeric constants | Alphanumeric constants |

2 | Alphanumeric variables represent | are always enclosed in " " |

3 | Alphanumeric constants | must begin with an alphabet |

4 | A variable | String variables |

5 | Alphanumeric variables are called | can take part in mathematical operations |

**Answer**

S. No | Column 1 | Column 2 |
---|---|---|

1 | Numeric constants | can take part in mathematical operations |

2 | Alphanumeric variables represent | Alphanumeric constants |

3 | Alphanumeric constants | are always enclosed in " " |

4 | A variable | must begin with an alphabet |

5 | Alphanumeric variables are called | String variables |

## Name them

#### Question 1

Two types of variables

**Answer**

**Numeric variables****Alphanumeric variables**

#### Question 2

Two types of constants

**Answer**

**Numeric constants****Alphanumeric constants**

## Correct the following expressions

#### Question 1

B$ = WORLD CUP 2007

**Answer**

B$ = "WORLD CUP 2007"

#### Question 2

"DELHI PUBLIC SCHOOL" = D$

**Answer**

D$ = "DELHI PUBLIC SCHOOL"

#### Question 3

$$A = "ARYA PUBLISHING COMPANY"

**Answer**

A$ = "ARYA PUBLISHING COMPANY"

#### Question 4

P$ = (A + B)^{2}

**Answer**

P = (A + B) ^ 2

#### Question 5

4B$ = "NEW DELHI"

**Answer**

B4$ = "NEW DELHI"

#### Question 6

A = 4P + 5Q

**Answer**

A = 4 * P + 5 * Q

#### Question 7

AVG = (2A + 3B + 4C)/3

**Answer**

AVG = (2 * A + 3 * B + 4 * C) / 3

#### Question 8

A*B = AB + CD

**Answer**

AB = A * B + C * D

## Write down the appropriate variables for the following

#### Question 1

_________ = "Understanding Information Technology"

**Answer**

* UIT$* = "Understanding Information Technology"

#### Question 2

_________ = A * B * C

**Answer**

* Product* = A * B * C

#### Question 3

_________ = "15th August 1947"

**Answer**

* Date$* = "15th August 1947"

#### Question 4

_________ = 1/2 * A + 1/4 * B

**Answer**

* Ans* = 1/2 * A + 1/4 * B

#### Question 5

_________ = 11.99

**Answer**

* Num* = 11.99

## Define the following terms

#### Question 1

Variables

**Answer**

Variables change their values at the time of execution. A variable may be a single character or a set of characters.

For example: A, B, B10, C$ etc.

#### Question 2

Constants

**Answer**

Constants are data items, the values of which do not change at the time of execution of the program.

For example: 76, -43, "Hello", etc.

#### Question 3

Numeric variables

**Answer**

These are the variables which can store numbers or numeric values. They can also store integer and real type numeric values.

For example: A = 45.

#### Question 4

Alphanumeric variables

**Answer**

These variables are used to store alphabets, words and special characters or their combinations. The set of characters to be stored must be put within double quotes (" ").

For example: A$ = "Hello".

#### Question 5

Alphanumeric constants

**Answer**

Any set of characters enclosed within double quotes (" ") can be called an alphanumeric constant. They do not change their value at the time of execution of the program.

For example: "Rishi", "April 4".

#### Question 6

Numeric constants

**Answer**

Numeric constants are the constants comprising of the digits. They may be accompanied by a negative sign or a decimal point. These constants are used for all kinds of mathematical operations.

For example: 56, -43, 7.43, -5.32 etc.

## Give two differences between

#### Question 1

Numeric constants and Alphanumeric constants

**Answer**

Numeric constants | Alphanumeric constants |
---|---|

Numeric constants comprise of digits. | Alphanumeric constants comprise of a set of characters. |

Numeric constants are not enclosed in double quotes. | Alphanumeric constants are enclosed in double quotes. |

#### Question 2

Numeric variables and Alphanumeric variables

**Answer**

Numeric variables | Alphanumeric variables |
---|---|

Numeric variables store numeric values. | Alphanumeric variables store alphabets, words, special characters or their combinations. |

These variables are used for mathematical operations. | Mathematical operations are not possible. |