Skip to main content
Chapter 5 of 11
NCERT Solutions

Getting Started with Python

Nagaland Board · Class 11 · Computer Science

NCERT Solutions for Getting Started with Python — Nagaland Board Class 11 Computer Science.

42 questions24 flashcards5 concepts

Interactive on Super Tutor

Studying Getting Started with 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

22 Questions Solved · 1 Section

Exercise — Getting Started with Python

1Which of the following identifier names are invalid and why?
i. Serial_no.
ii. 1st_Room
iii. Hundred$
iv. Total Marks
v. Total_Marks
vi. total-Marks
vii. Percentage
viii. True
Show solution
Rules for valid Python identifiers:
- Must begin with a letter (A–Z or a–z) or an underscore (_).
- Can contain letters, digits (0–9), and underscores only.
- Cannot be a Python keyword.
- No spaces or special characters allowed.

i. Serial_no.Invalid. Contains a dot (.), which is not allowed in an identifier.

ii. 1st_RoomInvalid. Starts with a digit (1), which is not permitted.

iii. HundredInvalid.Containsaspecialcharacter(Invalid. Contains a special character (), which is not allowed.

iv. Total MarksInvalid. Contains a space, which is not allowed.

v. Total_MarksValid. Starts with a letter and contains only letters and an underscore.

vi. total-MarksInvalid. Contains a hyphen (-), which is not allowed (it is interpreted as the minus operator).

vii. PercentageValid. Starts with a letter and contains only letters.

viii. TrueInvalid. `True` is a reserved keyword in Python and cannot be used as an identifier.
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
a) Assign 10 to `length` and 20 to `breadth`:
length, breadth=10,20\text{length, breadth} = 10, 20
```python
length, breadth = 10, 20
```

b) Assign the average of `length` and `breadth` to `sum`:
sum=(length+breadth)/2\text{sum} = (\text{length} + \text{breadth}) / 2
```python
sum = (length + breadth) / 2
```

c) Assign a list to `stationery`:
```python
stationery = ['Paper', 'Gel Pen', 'Eraser']
```

d) Assign strings to `first`, `middle`, `last`:
```python
first, middle, last = 'Mohandas', 'Karamchand', 'Gandhi'
```

e) Concatenate with spaces to form `fullname`:
```python
fullname = first + ' ' + middle + ' ' + last
```
This gives `fullname = 'Mohandas Karamchand Gandhi'`.
3Write logical expressions corresponding to the following statements in Python and evaluate the expressions (assuming variables num1, num2, num3, first, middle, last are already having meaningful values):
a) The sum of 20 and -10 is less than 12.
b) num3 is not more than 24.
c) 6.75 is between the values of integers num1 and num2.
d) The string 'middle' is larger than the string 'first' and smaller than the string 'last'.
e) List Stationery is empty.
Show solution
a) The sum of 20 and -10 is less than 12:
```python
(20 + (-10)) < 12
```
Evaluation: 20+(10)=1020 + (-10) = 10, and 10 &lt; 12 is True.

b) num3 is not more than 24:
```python
num3 <= 24
```
("Not more than" means less than or equal to.)

c) 6.75 is between the values of num1 and num2 (assuming num1 < num2):
```python
num1 < 6.75 < num2
```
or equivalently:
```python
(num1 < 6.75) and (6.75 < num2)
```

d) The string `middle` is larger than `first` and smaller than `last` (comparing variable values, not the literal strings):
```python
(middle > first) and (middle < last)
```

e) List `stationery` is empty:
```python
stationery == []
```
or equivalently:
```python
len(stationery) == 0
```
4Add a pair of parentheses to each expression so that it evaluates to True.
a) 0 == 1 == 2
b) 2 + 3 == 4 + 5 == 7
c) 1 < -1 == 3 > 4
Show solution
a) Original: 0==1==20 == 1 == 2 (evaluates to False)

Add parentheses:
```python
0 == (1 == 2)
```
Evaluation: (1==2)(1 == 2) is `False`, which equals `0` in Python. So 0==False0 == \text{False} is 0==00 == 0 which is True. ✓

b) Original: 2+3==4+5==72 + 3 == 4 + 5 == 7 (evaluates to False)

Add parentheses:
```python
2 + 3 == (4 + 5 == 7)
```
Evaluation: (4+5==7)(4 + 5 == 7)(9==7)(9 == 7) → `False` → 00. Then 2+3==02 + 3 == 05==05 == 0 → False.

Alternative:
```python
(2 + 3 == 4) + 5 == 7
```
Evaluation: (2+3==4)(2+3==4) → `False` → 00. Then 0+5==70 + 5 == 75==75 == 7 → False.

Best valid answer:
```python
2 + (3 == 4 + 5) == 2
```
Evaluation: (3==4+5)(3 == 4+5)(3==9)(3==9) → `False` → 00. Then 2+0==22 + 0 == 22==22 == 2True. ✓

c) Original: 1 &lt; -1 == 3 &gt; 4 (evaluates to False)

Add parentheses:
```python
1 < (-1 == 3) > 4
```
Evaluation: (1==3)(-1 == 3) → `False` → 00. Then 1 &lt; 0 → False. Not True.

Alternative:
```python
(1 < -1) == (3 > 4)
```
Evaluation: (1 &lt; -1) → `False`; (3 &gt; 4) → `False`. So `False == False` → True. ✓
5Write the output of the following:
a) num1 = 4; num2 = num1 + 1; num1 = 2; print(num1, num2)
b) num1, num2 = 2, 6; num1, num2 = num2, num1 + 2; print(num1, num2)
c) num1, num2 = 2, 3; num3, num2 = num1, num3 + 1; print(num1, num2, num3)
Show solution
a)
```python
num1 = 4
num2 = num1 + 1 # num2 = 4 + 1 = 5
num1 = 2 # num1 is reassigned to 2
print(num1, num2)
```
Output: `2 5`

---

b)
```python
num1, num2 = 2, 6
num1, num2 = num2, num1 + 2
# Right-hand side is evaluated first:
# num2 = 6, num1 + 2 = 2 + 2 = 4
# So num1 = 6, num2 = 4
print(num1, num2)
```
Output: `6 4`

---

c)
```python
num1, num2 = 2, 3
num3, num2 = num1, num3 + 1
```
Here, `num3` is used on the right-hand side (`num3 + 1`) before it has been assigned any value. This will raise a NameError: name 'num3' is not defined.

Output: `NameError: name 'num3' is not defined`
6Which 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
a) Number of months in a year:
Data type: `int` (Integer)
Reason: The number of months is a whole number (12). It has no fractional part.

b) Resident of Delhi or not:
Data type: `bool` (Boolean)
Reason: This is a yes/no (True/False) condition — either the person is a resident or not.

c) Mobile number:
Data type: `str` (String)
Reason: Although a mobile number consists of digits, no arithmetic operations are performed on it. It may also contain a leading zero or a '+' prefix (e.g., +91...), so it is best stored as a string.

d) Pocket money:
Data type: `float` (Floating point)
Reason: Pocket money can include paise (decimal values), e.g., ₹150.50, so a float is appropriate.

e) Volume of a sphere:
Data type: `float` (Floating point)
Reason: Volume involves π\pi and fractional values, e.g., 43πr3\frac{4}{3}\pi r^3, which results in a decimal number.

f) Perimeter of a square:
Data type: `float` (Floating point)
Reason: The side length may be a decimal value, making the perimeter (4×side4 \times \text{side}) a float. Even if integer, float is safer for general use.

g) Name of the student:
Data type: `str` (String)
Reason: A name is a sequence of alphabetic characters.

h) Address of the student:
Data type: `str` (String)
Reason: An address is a combination of letters, digits, and special characters, best represented as a string.
7Give the output of the following when num1 = 4, num2 = 3, num3 = 2:
a) num1 += num2 + num3; print(num1)
b) num1 = num1 (num2 + num3); print(num1)
c) num1
= num2 + num3
d) num1 = '5' + '5'; print(num1)
e) print(4.00/(2.0+2.0))
f) num1 = 2+9*((3*12)-8)/10; print(num1)
g) num1 = 24 // 4 // 2; print(num1)
h) num1 = float(10); print(num1)
i) num1 = int('3.14'); print(num1)
j) print('Bye' == 'BYE')
k) print(10 != 9 and 20 >= 20)
l) print(10 + 6 * 2 ** 2 != 9//4 - 3 and 29 >= 29/9)
m) print(5 % 10 + 10 < 50 and 29 <= 29)
n) print((0 < 6) or (not(10 == 6) and (10 < 0)))
Show solution
Given: `num1 = 4`, `num2 = 3`, `num3 = 2`

a)
```python
num1 += num2 + num3
# num1 = 4 + (3 + 2) = 4 + 5 = 9
print(num1)
```
Output: `9`

---

b)
```python
num1 = num1 (num2 + num3)
# num1 = 4
(3 + 2) = 4 5 = 1024
print(num1)
```
Output: `1024`

---

c)
```python
num1
= num2 + num3
# num1 = 4 (3 + 2) = 4 5 = 1024
```
(No print statement, so no output. `num1` becomes 1024.)

---

d)
```python
num1 = '5' + '5'
print(num1)
```
String concatenation: `'5' + '5'` = `'55'`
Output: `55`

---

e)
```python
print(4.00 / (2.0 + 2.0))
# = 4.00 / 4.0 = 1.0
```
Output: `1.0`

---

f)
```python
num1 = 2 + 9 * ((3 * 12) - 8) / 10
# Step 1: 3 * 12 = 36
# Step 2: 36 - 8 = 28
# Step 3: 9 * 28 = 252
# Step 4: 252 / 10 = 25.2
# Step 5: 2 + 25.2 = 27.2
print(num1)
```
Output: `27.2`

---

g)
```python
num1 = 24 // 4 // 2
# Left to right: 24 // 4 = 6, then 6 // 2 = 3
print(num1)
```
Output: `3`

---

h)
```python
num1 = float(10)
print(num1)
```
Converts integer 10 to float.
Output: `10.0`

---

i)
```python
num1 = int('3.14')
print(num1)
```
`int()` cannot directly convert a string containing a decimal point. This raises a ValueError: invalid literal for int() with base 10: '3.14'.
Output: `ValueError`

---

j)
```python
print('Bye' == 'BYE')
```
Python string comparison is case-sensitive. `'Bye'` ≠ `'BYE'`.
Output: `False`

---

k)
```python
print(10 != 9 and 20 >= 20)
# 10 != 9 → True
# 20 >= 20 → True
# True and True → True
```
Output: `True`

---

l)
```python
print(10 + 6 * 2 2 != 9 // 4 - 3 and 29 >= 29 / 9)
# Step 1: 2
2 = 4
# Step 2: 6 * 4 = 24
# Step 3: 10 + 24 = 34
# Step 4: 9 // 4 = 2
# Step 5: 2 - 3 = -1
# Step 6: 34 != -1 → True
# Step 7: 29 / 9 ≈ 3.222
# Step 8: 29 >= 3.222 → True
# Step 9: True and True → True
```
Output: `True`

---

m)
```python
print(5 % 10 + 10 < 50 and 29 <= 29)
# Step 1: 5 % 10 = 5
# Step 2: 5 + 10 = 15
# Step 3: 15 < 50 → True
# Step 4: 29 <= 29 → True
# Step 5: True and True → True
```
Output: `True`

---

n)
```python
print((0 < 6) or (not(10 == 6) and (10 < 0)))
# Step 1: 0 < 6 → True
# Since first operand of 'or' is True, result is True (short-circuit)
# (The second part: not(10==6) → not False → True; 10<0 → False; True and False → False)
# True or False → True
```
Output: `True`
8Categorise 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`

Category: Runtime Error

Reason: The expression is syntactically correct (Python can parse it), but when Python attempts to execute the division, it encounters division by zero, which is mathematically undefined. Python raises a `ZeroDivisionError` at runtime.

---

b) `num1 = 25; num2 = 0; num1/num2`

Category: Runtime Error

Reason: The syntax is correct and the variables are properly assigned. However, when the expression `num1/num2` is evaluated at runtime, `num2` is 0, causing a `ZeroDivisionError`. The error occurs during execution, not during parsing.
9A dartboard of radius 10 units and the wall it is hanging on are represented using a two-dimensional coordinate system, with the board's center at coordinate (0,0). Variables x and y store the x-coordinate and the y-coordinate of a dart that hits the dartboard. Write a Python expression using variables x and y that evaluates to True if the dart hits (is within) the dartboard, and then evaluate the expression for these dart coordinates:
a) (0,0)
b) (10,10)
c) (6,6)
d) (7,8)
Show solution
Concept: A point (x,y)(x, y) lies within or on a circle of radius rr centred at the origin if:
x2+y2r2x^2 + y^2 \leq r^2
Here, r=10r = 10, so the condition is x2+y2100x^2 + y^2 \leq 100.

Python Expression:
```python
(x2 + y2) <= 100
```

---

Evaluation:

a) (0, 0):
02+02=0100True0^2 + 0^2 = 0 \leq 100 \Rightarrow \textbf{True}
The dart hits the centre of the board.

b) (10, 10):
102+102=100+100=200100False10^2 + 10^2 = 100 + 100 = 200 \leq 100 \Rightarrow \textbf{False}
The dart misses the board.

c) (6, 6):
62+62=36+36=72100True6^2 + 6^2 = 36 + 36 = 72 \leq 100 \Rightarrow \textbf{True}
The dart hits the board.

d) (7, 8):
72+82=49+64=113100False7^2 + 8^2 = 49 + 64 = 113 \leq 100 \Rightarrow \textbf{False}
The dart misses the board.
10Write a Python program to convert temperature in degree Celsius to degree Fahrenheit. If water boils at 100 degree C and freezes at 0 degree C, use the program to find out what is the boiling point and freezing point of water on the Fahrenheit scale.
(Hint: T(°F) = T(°C) × 9/5 + 32)
Show solution
Formula: T(°F)=T(°C)×95+32T(°F) = T(°C) \times \dfrac{9}{5} + 32

Program:
```python
# Program to convert Celsius to Fahrenheit
celsius = float(input("Enter temperature in Celsius: "))
fahrenheit = (celsius * 9/5) + 32
print("Temperature in Fahrenheit =", fahrenheit)
```

Verification:

Boiling point (100°C):
F=100×95+32=180+32=212°FF = 100 \times \frac{9}{5} + 32 = 180 + 32 = 212°F

Freezing point (0°C):
F=0×95+32=0+32=32°FF = 0 \times \frac{9}{5} + 32 = 0 + 32 = 32°F

Output:
- Boiling point of water = 212.0 °F
- Freezing point of water = 32.0 °F
11Write a Python program to calculate the amount payable if money has been lent on simple interest. Principal or money lent = P, Rate of interest = R% per annum and Time = T years. Then Simple Interest (SI) = (P × R × T) / 100. Amount payable = Principal + SI. P, R and T are given as input to the program.Show solution
Formula:
SI=P×R×T100SI = \frac{P \times R \times T}{100}
Amount=P+SI\text{Amount} = P + SI

Program:
```python
# Program to calculate Simple Interest and Amount Payable
P = float(input("Enter Principal (P): "))
R = float(input("Enter Rate of Interest (R) in % per annum: "))
T = float(input("Enter Time (T) in years: "))

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

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

Sample Run:
```
Enter Principal (P): 1000
Enter Rate of Interest (R) in % per annum: 5
Enter Time (T) in years: 2
Simple Interest = 100.0
Amount Payable = 1100.0
```
12Write a program to calculate in how many days a work will be completed by three persons A, B and C together. A, B, C take x days, y days and z days respectively to do the job alone. The formula to calculate the number of days if they work together is xyz / (xy + yz + xz) days where x, y, and z are given as input to the program.Show solution
Formula:
Days together=xyzxy+yz+xz\text{Days together} = \frac{xyz}{xy + yz + xz}

Program:
```python
# Program to calculate days to complete work by A, B, C together
x = float(input("Enter days taken by A alone (x): "))
y = float(input("Enter days taken by B alone (y): "))
z = float(input("Enter days taken by C alone (z): "))

days_together = (x * y * z) / (x*y + y*z + x*z)

print("Number of days to complete work together =", days_together)
```

Sample Run:
```
Enter days taken by A alone (x): 6
Enter days taken by B alone (y): 8
Enter days taken by C alone (z): 12
Number of days to complete work together = 2.6666666666666665
```

Verification: 6×8×1248+96+72=576216=832.67\frac{6 \times 8 \times 12}{48 + 96 + 72} = \frac{576}{216} = \frac{8}{3} \approx 2.67 days ✓
13Write a program to enter two integers and perform all arithmetic operations on them.Show solution
Program:
```python
# Program to perform all arithmetic operations on two integers
num1 = int(input("Enter first integer: "))
num2 = int(input("Enter second integer: "))

print("Addition:", num1 + num2)
print("Subtraction:", num1 - num2)
print("Multiplication:", num1 * num2)

if num2 != 0:
print("Division:", num1 / num2)
print("Floor Division:", num1 // num2)
print("Modulus (Remainder):", num1 % num2)
else:
print("Division, Floor Division, and Modulus are undefined (division by zero).")

print("Exponentiation (num1 num2):", num1 num2)
```

Sample Run:
```
Enter first integer: 10
Enter second integer: 3
Addition: 13
Subtraction: 7
Multiplication: 30
Division: 3.3333333333333335
Floor Division: 3
Modulus (Remainder): 1
Exponentiation (num1 ** num2): 1000
```
14Write a program to swap two numbers using a third variable.Show solution
Concept: Use a temporary variable `temp` to hold one value during the swap.

Program:
```python
# Program to swap two numbers using a third variable
num1 = int(input("Enter first number: "))
num2 = int(input("Enter second number: "))

print("Before swapping: num1 =", num1, ", num2 =", num2)

# Swapping using a third variable
temp = num1
num1 = num2
num2 = temp

print("After swapping: num1 =", num1, ", num2 =", num2)
```

Sample Run:
```
Enter first number: 5
Enter second number: 10
Before swapping: num1 = 5 , num2 = 10
After swapping: num1 = 10 , num2 = 5
```
15Write a program to swap two numbers without using a third variable.Show solution
Concept: Python allows simultaneous (tuple) assignment, which swaps values without a temporary variable.

Program:
```python
# Program to swap two numbers without using a third variable
num1 = int(input("Enter first number: "))
num2 = int(input("Enter second number: "))

print("Before swapping: num1 =", num1, ", num2 =", num2)

# Swapping without a third variable
num1, num2 = num2, num1

print("After swapping: num1 =", num1, ", num2 =", num2)
```

Sample Run:
```
Enter first number: 5
Enter second number: 10
Before swapping: num1 = 5 , num2 = 10
After swapping: num1 = 10 , num2 = 5
```

Note: The right-hand side `num2, num1` is evaluated first as a tuple `(10, 5)`, then assigned to `num1, num2` simultaneously.
16Write a program to repeat the string "GOOD MORNING" n times. Here 'n' is an integer entered by the user.Show solution
Concept: In Python, a string can be repeated using the `*` operator: `string * n`.

Program:
```python
# Program to repeat the string "GOOD MORNING" n times
n = int(input("Enter the number of times to repeat: "))
result = "GOOD MORNING " * n
print(result)
```

Sample Run:
```
Enter the number of times to repeat: 3
GOOD MORNING GOOD MORNING GOOD MORNING
```
17Write a program to find average of three numbers.Show solution
Formula: Average=num1+num2+num33\text{Average} = \dfrac{\text{num1} + \text{num2} + \text{num3}}{3}

Program:
```python
# Program to find the average of three numbers
num1 = float(input("Enter first number: "))
num2 = float(input("Enter second number: "))
num3 = float(input("Enter third number: "))

average = (num1 + num2 + num3) / 3

print("Average of the three numbers =", average)
```

Sample Run:
```
Enter first number: 10
Enter second number: 20
Enter third number: 30
Average of the three numbers = 20.0
```
18The volume of a sphere with radius r is 4/3 π r³. Write a Python program to find the volume of spheres with radius 7cm, 12cm, 16cm, respectively.Show solution
Formula: V=43πr3V = \dfrac{4}{3} \pi r^3

Program:
```python
# Program to find the volume of spheres
import math

def volume_of_sphere(r):
return (4/3) * math.pi * r3

# Radii given
radii = [7, 12, 16]

for r in radii:
vol = volume_of_sphere(r)
print(f"Volume of sphere with radius {r} cm = {vol:.2f} cubic cm")
```

Output:
```
Volume of sphere with radius 7 cm = 1436.76 cubic cm
Volume of sphere with radius 12 cm = 7238.23 cubic cm
Volume of sphere with radius 16 cm = 17157.28 cubic cm
```

Verification for r = 7:**
V=43×3.14159×73=43×3.14159×3431436.76 cm3V = \frac{4}{3} \times 3.14159 \times 7^3 = \frac{4}{3} \times 3.14159 \times 343 \approx 1436.76 \text{ cm}^3
19Write a program that asks the user to enter their name and age. Print a message addressed to the user that tells the user the year in which they will turn 100 years old.Show solution
Concept: Year when user turns 100 = Current year + (100 − current age).

Program:
```python
# Program to find the year when the user will turn 100
import datetime

name = input("Enter your name: ")
age = int(input("Enter your age: "))

current_year = datetime.datetime.now().year
year_100 = current_year + (100 - age)

print(f"Hello {name}! You will turn 100 years old in the year {year_100}.")
```

Sample Run (assuming current year is 2024):
```
Enter your name: Aryan
Enter your age: 16
Hello Aryan! You will turn 100 years old in the year 2108.
```
20The formula E = mc² states that the equivalent energy (E) can be calculated as the mass (m) multiplied by the speed of light (c = about 3 × 10⁸ m/s) squared. Write a program that accepts the mass of an object and determines its energy.Show solution
Formula: E=mc2E = mc^2, where c=3×108c = 3 \times 10^8 m/s

Program:
```python
# Program to calculate energy using E = mc^2
c = 3 * (10**8) # Speed of light in m/s
m = float(input("Enter the mass of the object in kg: "))

E = m * c2

print(f"Mass = {m} kg")
print(f"Speed of light = {c} m/s")
print(f"Equivalent Energy E = {E} Joules")
```

Sample Run:
```
Enter the mass of the object in kg: 1
Mass = 1.0 kg
Speed of light = 300000000 m/s
Equivalent Energy E = 9e+16 Joules
```

Verification:** E=1×(3×108)2=9×1016E = 1 \times (3 \times 10^8)^2 = 9 \times 10^{16} J ✓
21Presume that a ladder is put upright against a wall. Let variables length and angle store the length of the ladder and the angle that it forms with the ground as it leans against the wall. Write a Python program to compute the height reached by the ladder on the wall for the following values of length and angle:
a) 16 feet and 75 degrees
b) 20 feet and 0 degrees
c) 24 feet and 45 degrees
d) 24 feet and 80 degrees
Show solution
Concept: When a ladder of length LL makes an angle θ\theta with the ground, the height hh reached on the wall is:
h=L×sin(θ)h = L \times \sin(\theta)

Note: Python's `math.sin()` takes angle in radians, so we convert degrees to radians using `math.radians()`.

Program:
```python
# Program to compute height reached by a ladder on the wall
import math

length = float(input("Enter the length of the ladder (in feet): "))
angle = float(input("Enter the angle with the ground (in degrees): "))

angle_rad = math.radians(angle)
height = length * math.sin(angle_rad)

print(f"Height reached by the ladder on the wall = {height:.2f} feet")
```

Evaluation for each case:

a) length = 16 feet, angle = 75°:
h=16×sin(75°)=16×0.965915.45 feeth = 16 \times \sin(75°) = 16 \times 0.9659 \approx 15.45 \text{ feet}

b) length = 20 feet, angle = 0°:
h=20×sin(0°)=20×0=0.0 feeth = 20 \times \sin(0°) = 20 \times 0 = 0.0 \text{ feet}
(Ladder is flat on the ground, reaches no height.)

c) length = 24 feet, angle = 45°:
h=24×sin(45°)=24×0.707116.97 feeth = 24 \times \sin(45°) = 24 \times 0.7071 \approx 16.97 \text{ feet}

d) length = 24 feet, angle = 80°:
h=24×sin(80°)=24×0.984823.64 feeth = 24 \times \sin(80°) = 24 \times 0.9848 \approx 23.64 \text{ feet}
Case StudySchools use 'Student Management Information System' (SMIS) to manage student-related data. Identify the personal details of students from your school identity card and write a program to accept these details for all students of your school and display them in the given format (Name of School, Student Name, Roll No, Class, Section, Address, City, Pin Code, Parent's/Guardian's Contact No).Show solution
Program:
```python
# Case Study: Student Management Information System (SMIS)
# Objective: Accept and display personal details of a student

# Input: Accept student details
school_name = input("Enter School Name: ")
student_name = input("Enter Student Name: ")
roll_no = input("Enter Roll No: ")
student_class = input("Enter Class: ")
section = input("Enter Section: ")
address_line1 = input("Enter Address Line 1: ")
address_line2 = input("Enter Address Line 2: ")
city = input("Enter City: ")
pin_code = input("Enter Pin Code: ")
contact_no = input("Enter Parent's/Guardian's Contact No: ")

# Output: Display student details in the required format
print()
print("\t\t", school_name)
print("Student Name :", student_name)
print("Roll No :", roll_no)
print("Class :", student_class)
print("Section :", section)
print("Address :", address_line1)
print(" ", address_line2)
print("City :", city)
print("Pin Code :", pin_code)
print("Parent's/Guardian's Contact No:", contact_no)
```

Sample Output:
```
ABC Public School
Student Name : PQR
Roll No : 99
Class : XI
Section : A
Address : Address Line 1
Address Line 2
City : ABC
Pin Code : 999999
Parent's/Guardian's Contact No: 9999999999
```

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 Getting Started with Python for Nagaland Board Class 11 Computer Science?
Getting Started with Python covers several key topics that are frequently asked in Nagaland Board 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 Getting Started with Python — Nagaland Board Class 11 Computer Science?
Understand the core concepts first, then work through the 42 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 Getting Started with Python Class 11 Computer Science?
This page has free step-by-step NCERT Solutions for every exercise question in Getting Started with Python (Nagaland Board Class 11 Computer Science) — 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 Getting Started with Python chapter — for free.

Quizzes, flashcards, AI doubt-solver and a step-by-step study plan for Nagaland Board Class 11 Computer Science.