Skip to main content
Chapter 3 of 8
NCERT Solutions

Brief Overview of Python

CBSE · Class 11 · Informatics Practices

NCERT Solutions for Brief Overview of Python — CBSE Class 11 Informatics Practices.

74 questions80 flashcards5 concepts

Interactive on Super Tutor

Studying Brief Overview of Python? Get the full interactive chapter.

Quizzes, flashcards, AI doubt-solver and a step-by-step study plan — built for ncert solutions and more.

1,000+ Class 11 students started this chapter today

11 Questions Solved · 1 Section

6 worked solutions below. Unlock all 11 free in Super Tutor

EXERCISE

1Which of the following identifier names are invalid and why?Show solution
Invalid identifier names are:

- a) `Serial_no.` — contains a dot (`.`), which is not allowed.
- b) `1st_Room` — starts with a digit, and an identifier cannot start with a digit.
- **c) `Hundredcontains`** — contains **``, a special symbol not allowed.
-
d) `Total Marks` — contains a space, which is not allowed.
-
f) `total-Marks` — contains a hyphen (`-`), which is not allowed.
-
h) `True` — it is a keyword/reserved word, so it cannot be used as an identifier.

Valid identifiers are
e) `Total_Marks` and g) `_Percentage`**.

Not sure why a step works? check your working in Super Tutor

2Write the corresponding Python assignment statements:
a) Assign 10 to variable length and 20 to variable breadth.
b) Assign the average of values of variables length and breadth to a variable sum.
c) Assign a list containing strings 'Paper', 'Gel Pen', and 'Eraser' to a variable stationery.
d) Assign the strings 'Mohandas', 'Karamchand', and 'Gandhi' to variables first, middle and last.
e) Assign the concatenated value of string variables first, middle and last to variable fullname. Make sure to incorporate blank spaces appropriately between different parts of names.
Show solution
The required assignment statements are:

```python
length = 10
breadth = 20
```

```python
sum = (length + breadth) / 2
```

```python
stationery = ['Paper', 'Gel Pen', 'Eraser']
```

```python
first = 'Mohandas'
middle = 'Karamchand'
last = 'Gandhi'
```

```python
fullname = first + ' ' + middle + ' ' + last
```

The blank spaces are added using `' '` so the full name is joined properly.

Not sure why a step works? check your working in Super Tutor

3Which data type will be used to represent the following data values and why?
a) Number of months in a year
b) Resident of Delhi or not
c) Mobile number
d) Pocket money
e) Volume of a sphere
f) Perimeter of a square
g) Name of the student
h) Address of the student
Show solution
The suitable data types are:

- a) Number of months in a yearint, because it is a whole number.
- b) Resident of Delhi or notbool, because it has only two values: yes/no, true/false.
- c) Mobile numberstr, because it is better treated as a string of digits and may contain leading zeroes.
- d) Pocket moneyfloat, because it may include paise/decimal part.
- e) Volume of a spherefloat, because it may come as a decimal value.
- f) Perimeter of a squarefloat, because the side length may be fractional, so the result may also be decimal.
- g) Name of the studentstr, because it is text.
- h) Address of the studentstr, because it is text.

Not sure why a step works? check your working in Super Tutor

4Give the output of the following when num1 = 4, num2 = 3, num3 = 2
a) num1 += num2 + num3
b) print (num1)
c) num1 = num1 (num2 + num3)
d) print (num1)
e) num1
= num2 + c
f) num1 = '5' + '5'
g) print(num1)
h) print(4.00/(2.0+2.0))
i) num1 = 2+9*((3*12)-8)/10
j) print(num1)
k) num1 = float(10)
l) print (num1)
m) num1 = int('3.14')
n) print (num1)
o) print(10 != 9 and 20 >= 20)
p) print(5 % 10 + 10 < 50 and 29 <= 29)
Show solution
Step by step:

- a) `num1 += num2 + num3` means `num1 = num1 + (num2 + num3)`
- `num2 + num3 = 3 + 2 = 5`
- `num1 = 4 + 5 = 9`

- b) `print(num1)` prints 9.

- c) `num1 = num1 (num2 + num3)`
- `num2 + num3 = 3 + 2 = 5`
- `num1 = 9
5 = 59049` if using the updated value from part (a)

But in such textbook output questions, each part is usually treated separately unless stated otherwise. Since the question says “when num1 = 4, num2 = 3, num3 = 2”, the sequence is interpreted in order. Therefore after (a), `num1` is 9, so:
- `num1 = 9 5 = 59049`

-
d) `print(num1)` prints 59049.

-
e) `num1 = num2 + c` causes an error because `c` is not defined.

- f) `num1 = '5' + '5'` joins strings, so the result is `'55'`.

- g) `print(num1)` prints 55.

- h) `print(4.00/(2.0+2.0))`
- denominator `2.0 + 2.0 = 4.0`
- `4.00 / 4.0 = 1.0`

- i) `num1 = 2 + 9*((3*12)-8)/10`
- `3*12 = 36`
- `36 - 8 = 28`
- `9 * 28 = 252`
- `252 / 10 = 25.2`
- `2 + 25.2 = 27.2`

So `num1` becomes 27.2.

- j) `print(num1)` prints 27.2.

- k) `num1 = float(10)` converts to 10.0.

- l) `print(num1)` prints 10.0.

- m) `num1 = int('3.14')` gives an error because `'3.14'` is not a valid integer string.

- n) `print(num1)` is not executed because the program has already stopped at the error in (m).

- o) `print(10 != 9 and 20 >= 20)`
- `10 != 9` is True
- `20 >= 20` is True
- `True and True` is True

- p) `print(5 % 10 + 10 < 50 and 29 <= 29)`
- `5 % 10 = 5`
- `5 + 10 = 15`
- `15 < 50` is True
- `29 <= 29` is True
- `True and True` is True

So the outputs/values are as listed above.

Not sure why a step works? check your working in Super Tutor

5Categorise the following as syntax error, logical error or runtime error:
a) 25 / 0
b) num1 = 25; num2 = 0; num1 / num2
Show solution
- a) `25 / 0`runtime error, because division by zero cannot be executed.
- b) `num1 = 25; num2 = 0; num1 / num2`runtime error, because the division by zero occurs during execution.

Not sure why a step works? check your working in Super Tutor

6Write a Python program to calculate the amount payable if money has been lent on simple interest. Principal or money lent = P, Rate = R% per annum and Time = T years. Then Simple Interest (SI) = (P x R x T) / 100.
Amount payable = Principal + SI.
P, R and T are given as input to the program.
Show solution
```python
# Calculate amount payable on simple interest
P = float(input("Enter principal: "))
R = float(input("Enter rate of interest: "))
T = float(input("Enter time in years: "))

SI = (P * R * T) / 100
Amount = P + SI

print("Simple Interest =", SI)
print("Amount payable =", Amount)
```

Not sure why a step works? check your working in Super Tutor

7Write a program to repeat the string “GOOD MORNING” n times. Here n is an integer entered by the user.
8Write a program to find the average of 3 numbers.
9Write a program that asks the user to enter one’s name and age. Print out a message addressed to the user that tells the user the year in which he/she will turn 100 years old.
10What is the difference between else and elif construct of if statement?
11Find the output of the following program segments:
a) for i in range(20, 30, 2):
print(i)
b) country = 'INDIA'
for i in country:
print (i)
c) i = 0; sum = 0
while i < 9:
if i % 4 == 0:
sum = sum + i
i = i + 2
print (sum)

5 more solved questions in Brief Overview of Python

Every remaining exercise is solved step by step in Super Tutor, plus practice quizzes and flashcards for this chapter. Free to start.

Stuck on a step?

Ask Super Tutor AI to explain any solution on this page in a simpler way — free, 24x7.

Ask a Doubt Free

Frequently Asked Questions

What are the important topics in Brief Overview of Python for CBSE Class 11 Informatics Practices?
Brief Overview of Python covers several key topics that are frequently asked in CBSE Class 11 board exams. Focus on the core concepts listed on this page and practise related questions to build confidence.
How to score full marks in Brief Overview of Python — CBSE Class 11 Informatics Practices?
Understand the core concepts first, then work through the 74 practice questions available for this chapter. Revise formulas and definitions regularly, and use flashcards for quick recall before the exam.
Where can I get free NCERT Solutions for Brief Overview of Python Class 11 Informatics Practices?
This page has free step-by-step NCERT Solutions for every exercise question in Brief Overview of Python (CBSE Class 11 Informatics Practices) — written the way examiners award marks: given, formula, working, answer.

Sources & Official References

Content is aligned to the official syllabus. Refer to the board website for the latest curriculum.

For serious students

Get the full Brief Overview of Python chapter — for free.

Quizzes, flashcards, AI doubt-solver and a step-by-step study plan for CBSE Class 11 Informatics Practices.