Tamil Nadu 12th Physics Model Question Paper 1 English Medium

Students can Download Tamil Nadu 12th Physics Model Question Paper 1 English Medium Pdf, Tamil Nadu 12th Physics Model Question Papers helps you to revise the complete Tamilnadu State Board New Syllabus and score more marks in your examinations.

TN State Board 12th Physics Model Question Paper 1 English Medium

Instructions:

  1. The question paper comprises of four parts
  2. You are to attempt all the parts. An internal choice of questions is provided wherever: applicable
  3. All questions of Part I, II, III and IV are to be attempted separately
  4. Question numbers 1 to 15 in Part I are Multiple choice Questions of one mark each. These are to be answered by choosing the most suitable answer from the given four alternatives and writing the option code and the corresponding answer
  5. Question numbers 16 to 24 in Part II are two-mark questions. These are lo be answered in about one or two sentences.
  6. Question numbers 25 to 33 in Part III are three-mark questions. These are lo be answered in about three to five short sentences.
  7. Question numbers 34 to 38 in Part IV are five-mark questions. These are lo be answered in detail. Draw diagrams wherever necessary.

Time: 3 Hours
Max Marks: 70

PART – 1

Answer all the questions. Choose the correct answer. [15 × 1 = 15]

Question 1.
An electric dipole is placed at an alignment angle of 30° with an electric field of 2 × 105 NC-1. It experiences a torque equal to 8 N m. The charge on the dipole if the dipole length is 1 cm is ……………….
(a) 4 mC
(b) 8 mC
(c) 5 mC
(d) 7 mC
Answer:
(b) 8 mC

Question 2.
Dielectric constant of metals is
(a) 1
(b) greater then 1
(c) zero
(d) infinite
Answer:
(d) infinite

Tamil Nadu 12th Physics Model Question Paper 1 English Medium

Question 3.
Two wires of A and B with circular cross section made up of the same material with equal lengths. Suppose RA = 3 RB, then what is the ratio of radius of wire A to that of B?
(a) 3
(b) √3
(c) \(\frac{1}{\sqrt{3}}\)
(d) \(\frac{1}{3}\)
Answer:
(c) \(\frac{1}{\sqrt{3}}\)

Question 4.
A circular coil of radius 5 cm and 50 turns carries a current of 3 ampere. The magnetic dipole moment of the coil is
(a) 1.0 amp – m2
(b) 1.2 amp – m2
(c) 0.5 amp – m2
(d) 0.8 amp – m2
Answer:
(b) 1.2 amp – m2

Question 5.
A straight conductor carrying a current I, is split into a circular loop of radius r as shown in the figure. The magnetic field at the centre O of the circle, in tesla is …………..
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 1
(a) \(\frac{\propto_{0} \mathrm{I}}{2 r}\)
(b) \(\frac{\mu_{0} I}{2 \pi r}\)
(c) \(\frac{\mu_{0} I}{\pi r}\)
(d) zero
Hint Field due to the upper and lower semicircles will cancel out.
Answer:
(d) zero

Question 6.
The flux linked with a coil at any instant t is given by ΦB = 10t2 – 50t + 250. The induced emf at t = 3s is ………………. .
(a) -190 V
(b) -10 V
(c) 10 V
(d) 190 V
Answer:
(b) -10 V

Question 7.
Quantity that remains unchanged in a transformer is
(a) voltage
(b) current
(c) frequency
(d) none of these
Answer:
(c) frequency

Tamil Nadu 12th Physics Model Question Paper 1 English Medium

Question 8.
The electric and the magnetic field, associated with an electromagnetic wave, propagating along X axis can be represented by
(a) \(\overrightarrow{\mathrm{E}}\) = E0ĵ and \(\overrightarrow{\mathrm{B}}\) = B0
(b) \(\overrightarrow{\mathrm{E}}\) = E0K̂ and \(\overrightarrow{\mathrm{B}}\) = B0
(c) \(\overrightarrow{\mathrm{E}}\) = E0î and \(\overrightarrow{\mathrm{B}}\) = B0
(d) \(\overrightarrow{\mathrm{E}}\) = E0ĵ and \(\overrightarrow{\mathrm{B}}\) = B0
Answer:
(b) \(\overrightarrow{\mathrm{E}}\) = E0K̂ and \(\overrightarrow{\mathrm{B}}\) = B0

Question 9.
A ray of light strikes a glass plate at an angle 60°. If the reflected and refracted rays are perpendicular to each other, the refractive index of the glass is
(a) √3
(b) \(\frac{3}{2}\)
(c) \(\sqrt{\frac{3}{2}}\)
(d) 2
Hint. Angle of refraction r = 60° ;
Angle of incident i = 30°
sin i = n × sin r
n = \(\frac{\sin 30^{\circ}}{\sin 60^{\circ}}\) = √3
Answer:
(a) √3

Question 10.
For light incident from air onto a slab of refractive index 2. Maximum possible angle of refraction is
(a) 30°
(b) 45°
(c) 60°
(d) 90°
Hint. From Snell’s law, µ = \(\frac{\sin i}{\sin r}\)
Now consider an angle of incident is 90°
sinr = \(\frac{\sin 90^{\circ}}{2}\)
r = sin-1 (0.5)
r = 30°
Answer:
(a) 30°

Question 11.
A light of wavelength 500 nm is incident on a sensitive plate of photoelectric work function 1.235 eV. The kinetic energy of the photo electrons emitted is be (Take h = 6.6 × 10-34 Js)
(a) 0.58 eV
(b) 2.48 eV
(c) 1.24 eV
(d) 1.16 eV
Hint.
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 2
= (2.48 – 1.235) eV= 1.245 eV
Answer:
(c) 1.24 eV

Tamil Nadu 12th Physics Model Question Paper 1 English Medium

Question 12.
In a hydrogen atom, the electron revolving in the fourth orbit, has angular momentum equal to ………….. .
(a) h
(b) \(\frac{h}{\pi}\)
(c) \(\frac{4 h}{\pi}\)
(d) \(\frac{2 h}{\pi}\)
Hint Angular momentum of an electron is an integral multiple of \(\frac{h}{2 \pi}\)
According to Bohr atom model,
Angular momentum of an electron mvr = \(\frac{nh}{2 \pi}\)
n = 4th orbit = \(\frac{4h}{2 \pi}\)
mvr = \(\frac{2 h}{\pi}\)
Answer:
(d) \(\frac{2 h}{\pi}\)

Question 13.
The barrier potential of a silicon diode is approximately
(a) 0.7 V
(b) 0.3V
(c) 2.0 V
(d) 2.2V
Answer:
(a) 0.7 V

Question 14.
The signal is affected by noise in a communication system
(a) At the transmitter
(b) At the modulator
(c) In the channel
(d) At the receiver
Answer:
(c) In the channel

Question 15.
The particle which gives mass to protons and neutrons are
(a) Higgs particle
(b) Einstein particle
(c) Nanoparticle
(d) Bulk particle
Answer:
(a) Higgs particle

PART – II

Answer any six questions. Question No. 21 is compulsory. [6 × 2 = 12]

Question 16.
Define ‘electrostatic potential”.
Answer:
The electric potential at a point P is equal to the work done by an external force to bring a unit positive charge with constant velocity from infinity to the point P in the region of the external electric field \(\overrightarrow{\mathrm{E}} \cdot\)

Question 17.
Define temperature coefficient of resistance.
Answer:
It is defined as the ratio of increase in resistivity per degree rise in temperature to its resistivity at T0
∴ \(\alpha=\frac{\rho_{\mathrm{T}}-\rho_{\mathrm{o}}}{\rho_{\mathrm{o}}\left(\mathrm{T}-\mathrm{T}_{\mathrm{o}}\right)}=\frac{\Delta \rho}{\rho_{\mathrm{o}} \Delta \mathrm{T}}\)

Tamil Nadu 12th Physics Model Question Paper 1 English Medium

Question 18.
The self-inductance of an air-core solenoid is 4.8 mH. If its core is replaced by iron core, then its self-inductance becomes 1.8 H. Find out the relative permeability of iron.
Answer:
Lair = 4.8 × 10-3
Liron = 1.8 H
Lair = μ0n2Al = 4.8 × 10″3H
Liron = μn2Al = μ0μr n2Al= 1.8 H
∴ \(\mu_{r}=\frac{L_{\text {ipon }}}{L_{\text {air }}}=\frac{1.8}{4.8 \times 10^{-3}}=375\)

Question 19.
What is meant by Fraunhofer lines?
Answer:
When the spectrum obtained from the Sun is examined, it consists of large number of dark lines (line absorption spectrum). These dark lines in the solar spectrum are known as Fraunhofer lines.

Question 20.
What is power of a lens?
Answer:
The power of a lens P is defined as the reciprocal of its focal length. P = \(\frac{1}{f}\)
The unit of power is diopter D.

Question 21.
Calculate the cut-off wavelength and cutoff frequency of x-rays from an x-ray tube of accelerating potential 20,000 V.
Answer:
The cut-off wavelength of the characteristic x-rays is
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 3

Question 22.
What is mass defect?
Answer:
The mass of any nucleus is always less than the sum of the mass of its individual constituents. The difference in mass Am is called mass defect.
Δm = (Zmp + Nmn) – M

Question 23.
Simplify the Boolean identity AC + ABC = AC
Answer:
Step 1: AC (1 + B) = AC.1 [OR law-2]
Step 2: AC . 1 = AC [AND law 2]
Therefore, AC + ABC = AC
Circuit Description
Thus the given statement is proved.
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 4

Tamil Nadu 12th Physics Model Question Paper 1 English Medium

Question 24.
What do you mean by Internet of Things?
Answer:
Internet of Things (IoT), it is made possible to control various devices from a single device. Example: home automation using a mobile phone.

PART-III

Answer any six questions. Question No. 26 is compulsory. [6 × 3 = 18]

Question 25.
Give the relation between electric field and electric potential.
Answer:
Consider a positive charge q kept fixed at the origin. To move a unit positive charge by a small ‘ distance dx in the electric field E, the work done is given by dW = -E dx. The minus sign implies that work is done against the electric field. This work done is equal to electric potential difference. Therefore,
dW = dV. (or) dV = -E dx
Hence E = \(-\frac{d V}{d x}\)
The electric field is the negative gradient of the electric potential.

Question 26.
A cicopper wire of 10”6 m2 area of cross section, carries a current of 2 A. If the number of electrons per cubic meter is 8 × 1028, calculate the current density and average drift velocity
Answer:
Cross-sections area of copper wire, A = 10-6 m2
I = 2A
Number of electron, n = 8 × 1028
Current density, J = \(\frac{I}{A}=\frac{2}{10^{-6}}\)
J = 2 × 106Am-2
Average drift velocity, Vd = \(\frac{I}{n e A}\)
e is the charge of electron = 1.6 × 10-9 C
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 5
Vd = 0.15625 × 10-3 ; Vd = 15.6 × 10-5 ms-1

Question 27.
compare dia, para and ferromagnetism.
Answer:
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 6

Question 28.
State Faraday’s laws of electromagnetic induction.
Answer:
First law: Whenever magnetic flux linked with a closed circuit changes, an emf is induced in the circuit.
Second law: The magnitude of induced emf in a closed circuit is equal to the time rate of change of magnetic flux linked with the circuit.

Question 29.
Why does sky appear blue?
Answer:
Blue colour of the sky is due to scattering of sunlight by air molecules. According to Rayleigh’s law, intensity of scattered light, I ∝ \(\frac{1}{\lambda^{4}}\). So blue light of shorter wavelength is scattered much more than red light of larger wavelength. The blue component is proportionally more in light coming from different parts of the sky. That is why the sky appears blue.

Tamil Nadu 12th Physics Model Question Paper 1 English Medium

Question 30.
Write down the postulates of Bohr atom model.
Answer:
Postulates of Bohr atom model:
The electron in an atom moves around nucleus in circular orbits under the influence of Coulomb electrostatic force of attraction. This Coulomb force gives necessary centripetal force for the electron to undergo circular motion.

Electrons in an atom revolve around the nucleus only in certain discrete orbits called stationary orbits where it does not radiate electromagnetic energy. Only those discrete orbits allowed are stable orbits.

Question 31.
State De Morgan’s first and second theorems.
Answer:
De Morgan’s First Theorem:
The first theorem states that the complement of the sum of two logical inputs is equal to the product of its complements.
\(\overline{\mathrm{A}+\mathrm{B}}=\overline{\mathrm{A}} \cdot \overline{\mathrm{B}}\)

De Morgan’s Second Theorem:
The second theorem states that the complement of the product of two inputs is equal to the sum of its complements.
\(\overline{\mathrm{A} \cdot \mathrm{B}}=\overline{\mathrm{A}}+\overline{\mathrm{B}}\)

Question 32.
Write down the advantages and limitations of amplitude modulation (AM).
Answer:
Advantages of AM

  • Easy transmission and reception
  • Lesser bandwidth requirements
  • Low cost

Limitations of AM

  • Noise level is high
  • Low efficiency
  • Small operating range

Question 33.
What are black holes?
Answer:
Black holes are end stage of stars which are highly dense massive object. Its mass ranges from 20 times mass of the sun to 1 million times mass of the sun. It has very strong gravitational force such that no particle or even light can escape from it. The existence of black holes is studied when the stars orbiting the black hole behave differently from the other starts. Every galaxy has black hole at its center. Sagittarius A* is the black hole at the center of the Milky Way galaxy.

Tamil Nadu 12th Physics Model Question Paper 1 English Medium

PART – IV

Answer all the questions. [5 × 5 = 25]

Question 34.
(a) Derive an expression for the torque experienced by a dipole due to a uniform electric field.
Answer:
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 7
Torque experienced by an electric dipole in the uniform electric field: Consider an electric dipole of dipole moment \(\overrightarrow{\mathrm{P}}\) placed in a uniform electric field \(\overrightarrow{\mathrm{E}}\) whose field lines are equally spaced and point in the same direction. The charge +q will experience a force q \(\overrightarrow{\mathrm{E}}\) in the direction of the field and charge -q will experience a force -q \(\overrightarrow{\mathrm{E}}\) in a direction opposite to the field. Since the external field
\(\overrightarrow{\mathrm{E}}\) is uniform, the total force acting on the dipole is zero. These two forces acting at different points will constitute a couple and the dipole experience a torque. This torque tends to rotate the dipole. (Note that electric field lines of a uniform field are equally spaced and point in the same direction). The total torque on the dipole about the point O
\(\vec{\tau}=\overrightarrow{O A} \times(-q \vec{E})+\overrightarrow{O B} \times q \vec{E}\)
Using right-hand corkscrew rule, it is found that total torque is perpendicular to the plane of the paper and is directed into it.
The magnitude of the total torque
\(\vec{\tau}=|\overrightarrow{\mathrm{OA}}|(-q \overrightarrow{\mathrm{E}}) \sin \theta+|\overrightarrow{\mathrm{OB}} \| q \overrightarrow{\mathrm{E}}| \sin \theta\)
\(\vec{\tau}\) = qE 2a sin θ
where θ is the angle made by \(\vec{p}\) with \(\vec{E}\). Since p = 2aq, the torque is written in terms of the vector product as
\(\vec{\tau}=\vec{p} \times \vec{E}\)
The magnitude of this torque is \(\tau\) =pE sin θ and is maximum when θ = 90°.
This torque tends to rotate the dipole and align it with the electric field \(\vec{E}\) . Once \(\vec{p}\) is aligned with \(\vec{E}\), the total torque on the dipole becomes zero.

OR

Question 34.
(b) Explain the determination of the internal resistance of a cell using voltmeter.
Answer:
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 8
Determination of internal resistance : The emf of cell \(\xi\) is measured by connecting a high resistance voltmeter across it without connecting the external resistance R. Since the voltmeter draws very little current for deflection, the circuit may be considered as open. Hence, the voltmeter reading gives the emf of the cell. Then, external resistance R is included in the circuit and current I is established in the circuit. The potential difference across R is equal to the potential difference across the cell (V).
The potential drop across the resistor R is
V = IR …………. (1)
Due to internal resistance r of the cell, the voltmeter reads a value V, which is less than the emf of cell . It is because, certain amount of voltage (Ir) has dropped across the internal resistance r.
Then V = \(\xi\) – Ir
Ir = \(\xi\) – V
Dividing equation (2) by equation (1). we get
\(\begin{aligned}
\frac{I r}{I R} &=\frac{\xi-V}{V} \\
r &=\left|\frac{\xi-V}{V}\right| R
\end{aligned}\)
Since \(\xi\), V and R are known, internal resistance r can be determined.

Tamil Nadu 12th Physics Model Question Paper 1 English Medium

Question 35.
(a) Obtain the magnetic induction at a point on the equatorial line of a bar magnet.
Answer:
Magnetic field at a point along the equatorial line due to a magnetic dipole (bar magnet) Consider a bar magnet NS. Let N be the north pole and S be the south pole of the bar magnet, each with pole strength qm and separated by a distance of 2l. The magnetic field at a point C (lies along the equatorial line) at a distance r from the geometrical center O of the bar magnet can be computed by keeping unit north pole (qm C = 1 A m) at C. The force experienced by the unit north pole at C due to pole strength N – S can be computed using Coulomb’s law of
magnetism as follows:

The force of repulsion between North Pole of the bar magnet and unit north pole at point C
(in free space) is
\(\overrightarrow{\mathrm{F}}_{\mathrm{N}}=-\mathrm{F}_{\mathrm{N}} \cos \theta \hat{i}+\mathrm{F}_{\mathrm{N}} \sin \theta \hat{j}\) ……….. (2)
Where FN = \(\frac{\mu_{0}}{4 \pi} \frac{q_{m}}{r^{\prime 2}}\)

Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 9
From equation (1) and equation (2). the net force at point C is \(\overrightarrow{\mathrm{F}}=\overrightarrow{\mathrm{F}}_{\mathrm{N}}+\mathrm{F}_{\mathrm{S}}\) This net force is equal to the magnetic field at the point C.
\(\overrightarrow{\mathrm{B}}\) =—(FN+Fs)cosOi
Since, FN = Fs
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 10
In a right angle triangle NOC as shown in the Figure 1
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 11

Substituting equation 4 in equation 3 we get
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 12
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 13
Since, magnitude of magnetic dipole moment is |\(\vec{p}\)m| = Pm = qm.2l and substituting in equation (5), the magnetic field at a point C
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 14

If the distance between two poles in a bar magnet are small (looks like short magnet) when compared to the distance between geometrical center O of bar magnet and the location of point
C i.e., r >>l, then,
(r2 + l2)3/2 ≈ r3 …….. (7)
Therefore, using equation (7) in equation (6), we get
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 15
Since Pmî = \(\vec{p}\) m in general, the magnetic field al equatorial point is given by
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 16
Note that magnitude of Baxial is twice that of magnitude of Bequatorial and the direction of Baxial and Bequatorial are opposite.

[OR]

Tamil Nadu 12th Physics Model Question Paper 1 English Medium

Question 35.
(b) How will you induce an emf by changing the area enclosed by the coil?
Answer:
Induction of emf by changing the area of the coil: Consider a conducting rod of length 1 moving with a velocity v towards left on a rectangular metallic framework. The whole arrangement is placed in a uniform magnetic field B whose magnetic lines are perpendicularly directed into the plane of the paper. As the rod moves from AB to DC in a time dt , the area enclosed by the loop and hence the magnetic flux through the loop decreases.

Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 17

The change in magnetic flux in time dr is
B = B × change in area
= B × AreaABCD
= Blvdt
since Area ABCD l(vdt)
or = \(\frac{d \Phi_{\mathrm{B}}}{d t}=\mathrm{B} l v\)
As a result of change in flux, an emf is generated in the loop. The magnitude of the induced emf is
\(\varepsilon=\frac{d \Phi_{\mathrm{B}}}{d t}=\mathrm{B} / v\)
This emf is called motional emf. The direction of induced current is found to be clockwise from Fleming’s right hand rule.

Question 36.
(a) Write down Maxwell equations in integral form.
Answer:
Maxwell’s equations in integral form: Electrodynamics can be summarized into four basic equations, known as Maxwell’s equations. These equations are analogous to Newton’s equations in mechanics. Maxwell’s equations completely explain the behaviour of charges, currents and prop

1. First equation is nothing but the Gauss’s law. It relates the net electric flux to net electric charge enclosed in a surface. Mathematically, it is expressed as
\(\oint \overrightarrow{\mathrm{E}} \cdot d \overrightarrow{\mathrm{A}}=\frac{\mathrm{Q}_{\text {enclosed }}}{\varepsilon_{0}}\)
Where \(\overrightarrow{\mathrm{E}}\) is the electric field and Qenclosed is the charge enclosed. This equation is true for both discrete or continuous distribution of charges. It also indicates that the electric field lines start from positive charge and terminate at negative charge. This implies that the electric field lines do not form a continuous closed path. In other words, it means that isolated positive charge or negative charge can exist.

2. Second equation has no name. But this law is similar to Gauss’s law in electrostatics. So this law can also be called as Gauss’s law in magnetism. The surface integral of ‘ magnetic field over a closed surface is zero. Mathematically,
\(\oint \overrightarrow{\mathrm{B}} \cdot d \overrightarrow{\mathrm{A}}=0\)
where \(\overrightarrow{\mathrm{B}}\) is the magnetic field. This equation implies that the magnetic lines of force form a continuous closed path. In other words, it means that no isolated magnetic monopole exists.

3. Third equation is Faraday’s law of electromagnetic induction. This law relates electric field with the changing magnetic flux which is mathematically written as
\(\oint \overrightarrow{\mathrm{E}} \cdot d \vec{l}=\frac{d}{d t} \Phi_{\mathrm{B}}\)
where \(\overrightarrow{\mathrm{E}}\) is the electric field. This equation implies that the line integral of the electric field around any closed path is equal to the rate of change of magnetic flux through the closed path bounded by the surface.

4. Fourth equation is modified Ampere’s circuital law. This is also known as ampere Maxwell’s law. This law relates the magnetic field around any closed path to the conduction current and displacement current through that path.
\(\oint \overrightarrow{\mathrm{B}} \cdot d \vec{l}=\mu_{0} \mathrm{I}_{\text {enclosed }}+\mu_{0} \varepsilon_{0} \int \overrightarrow{\mathrm{E}} \cdot \overrightarrow{d \mathrm{A}}\)
Where \(\overrightarrow{\mathrm{B}}\) is the magnetic field. This equation shows that both conduction and also displacement current produces magnetic field. These four equations are known as Maxwell’s equations in electrodynamics.

Tamil Nadu 12th Physics Model Question Paper 1 English Medium

[OR]

Question 36.
(b) Obtain lens maker’s formula and mention its significance.
Answer:
Lens maker’s formula and lens equation: Let us consider a thin lens made up of a medium of refractive index n2 is placed in a medium of refractive index n1 . Let R1 and R2 be the radii of curvature of two spherical surfaces (1) and (2) respectively and P be the pole. Consider a point object O on the principal axis. The ray which falls very close to P, after refraction at the surface (1) forms image at I’. Before it does so, it is again refracted by the surface (2). Therefore the final image is formed at I. The general equation for the refraction at a spherical surface is given by
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 18
For the refracting surface (1), the light goes from to n1 to n2
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 19
If the object is at infinity, the image is formed at the focus of the lens. Thus, for u = oo, v =/ Then the equation becomes.
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 20
If the refractive index of the lens is n2 and it is placed in air, then n2 = n and n1 = 1. So the equation (4) becomes,
\(\frac{1}{f}=(n-1)\left(\frac{1}{\mathrm{R}_{1}}-\frac{1}{\mathrm{R}_{2}}\right)\)

The above equation is called the lens maker’s formula, because it tells the lens manufactures what curvature is needed to make a lens of desired focal length with a material of particular refractive index. This formula holds good also for a concave lens. By comparing the equations (3) and (4) we can write,
\(\frac{1}{v}-\frac{1}{u}=\frac{1}{f}\) ……… (6)
This equation is known as lens equation which relates the object distance it and image distance v with the focal length / of the lens. This formula holds good for a any type of lens.

Tamil Nadu 12th Physics Model Question Paper 1 English Medium

Question 37.
(a) Briefly discuss the observations of Hertz, Hallwachs and Lenard.
Answer:
Hertz observation:

  • In 1887, Heinrich Hertz first became successful in generating and detecting electromagnetic wave with his high voltage induction coil to cause a spark discharge between two metallic spheres.
  • When a spark is formed, the charges will oscillate back and forth rapidly and the electromagnetic waves are produced.
  • The electromagnetic waves thus produced were detected by a detector that has a copper wire bent in the shape of a circle. Although the detection of waves is successful, there is a problem in observing the tiny spark produced in the detector.
  • In order to improve the visibility of the spark, Hertz made many attempts and finally noticed an important thing that small detector spark became more vigorous when it was exposed to ultraviolet light.
  • The reason for this behaviour of the spark was not known at that time. Later it was found that it is due to the photoelectric emission.
  • Whenever ultraviolet light is incident on the metallic sphere, the electrons on the outer surface are emitted which caused the spark to be more vigorous.

Hallwachs’ observation:
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 22

  • In 1888, Wilhelm Hallwachs, a German physicist, confirmed that the strange behaviour of the spark is due to the action of ultraviolet light with his simple experiment.
  • A clean circular plate of zinc is mounted on an insulating stand and is attached to a gold leaf electroscope by a wire. When the uncharged zinc plate is irradiated by ultraviolet light from an arc lamp, it becomes positively charged and the leaves will open.
  • Further, if the negatively charged zinc plate is exposed to ultraviolet light, the leaves will close as the charges leaked away quickly. If the plate is positively charged, it becomes more positive upon UV rays irradiation and the leaves will open further.
  • From these observations, it was concluded that negatively charged electrons were emitted from the zinc plate under the action of ultraviolet light.

Lenard,s observation:
1. In 1902, Lenard studied this electron emission phenomenon in detail. The apparatus consists of two metallic plates A and C placed in an evacuated quartz bulb. The galvanometer G and battery B are connected in the circuit.

2. When ultraviolet light is incident on the negative plate C, an electric current flows in the circuit that is indicated by the deflection in the galvanorneter. On other hand, if the positive plate is irradiated by
the ultraviolet light, no current is observed in the circuit.

3. From these observations, it is concluded that when ultraviolet light falls on the negative plate. electrons are ejected from it which are attracted by the positive plate A. On reaching the positive plate through the evacuated bulb, the circuit is completed and the current flows in it.

4. Thus, the ultraviolet light falling on the negative plate causes the electron emission from
the surface of the plate.
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 23

Tamil Nadu 12th Physics Model Question Paper 1 English Medium

[OR]

Question 37.
(b) Obtain the law of radioactivity.
Law of radioactive decay:
At any instant t, the number of decays per unit time, called rate of decay \(\left(\frac{d \mathrm{N}}{d t}\right)\) is proportional to the number of nuclei (N ) at the same instant.
\(\frac{d \mathrm{N}}{d t} \propto \mathrm{N}\)

By introducing a proportionality constant, the relation can be written as dN
\(\frac{d \mathrm{N}}{d t}=-\lambda \mathrm{N}\) ……… (1)

Here proportionality constant X is called decay constant which is different for different radioactive sample and the negative sign in the equation implies that the N is decreasing with time. By rewriting the equation (1), we get
dN = -λ Ndt …………(2)

Here dN represents the number of nuclei decaying in the time interval dt. Let us assume that at time t = 0 s, the number of nuclei present in the radioactive sample is N0 . By integrating the equation (2), we can calculate the number of undecayed nuclei N at any time t.
From equation (2), we get
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 24
Taking exponentials on both sides, we get
N = N0e-λt …… (4)
[Note: elnx = ey ⇒ x = ey]
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 25

Equation (4) is called the law of radioactive decay. Here N denotes the number of undecayed nuclei present at any time t and N0 denotes the number of nuclei at initial time I = O. Note that the number of atoms is decreasing exponentially over the time. This implies that the time taken for all the radioactive nuclei to decay will be infinite. Equation (4) is plotted.
We can also define another useful quantity called activity (R) or decay rate which is the number of nuclei decayed per second and it is denoted as R = \(\left|\frac{d \mathbf{N}}{d t}\right|\)
Note: that activity R is a positive quantity. From equation (4), we get
R = \(\left|\frac{d \mathrm{N}}{d t}\right|=\lambda \mathrm{N}_{0} e^{-\lambda t}\) …… (5)
R = R0e-λt …………..(6)
where R0 = λN0
The equation (6) is also equivalent to radioactive law of decay. Here RQ is the activity of the sample at t = 0 and R is the activity of the sample at any time t. From equation (6), activity also shows exponential decay behavior. The activity R also can be expressed in terms of number of undecayed atoms present at any time t. From equation (6), since N = N0 e-λt we write
R = λN …………..(7)
Equation (4) implies that the activity at any time t is equal to the product of decay constant and number of undecayed nuclei at the same time t. Since N decreases over time, R also decreases.

Tamil Nadu 12th Physics Model Question Paper 1 English Medium

Question 38.
(a) Describe the function of a transistor as an amplifier with the neat circuit diagram. Sketch the input and output wave form.
Answer:
Transistor as an amplifier:
A transistor operating in the active region has the capability to amplify weak signals. Amplification is the process of increasing the signal strength (increase in the amplitude). If a large amplification is required, the transistors are cascaded with coupling elements like resistors, capacitors, and transformers which is called as multistage amplifiers.

Here, the amplification of an electrical signal is explained with a single stage transistor amplifier as shown in figure (a). Single stage indicates that the circuit consists of one transistor with the allied components. An NPN transistor is connected in the common emitter configuration.
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 26
To start with, the Q point or the operating point of the transistor is fixed so as to get the maximum signal swing at the output (neither towards saturation point nor towards cut-off). A load resistance, Rc is connected in series with the collector circuit to measure the output voltage. The capacitor C1 allows only the ac signal to pass through. The emitter bypass capacitor CE provides a low reactance path to the amplified ac signal. The coupling capacitor Cc is used to couple one stage of the amplifier with the next stage while constructing multistage amplifiers. Vs is the sinusoidal input signal source applied across the base-emitter. The output is taken across the collector-emitter.
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 30
Applying Kirchhoff ’s voltage law in the output loop, the collector-emitter voltage is given by
VCE = VCC – IC RC

Working of the amplifier:
During the positive half cycle
Input signal (Vs) increases the forward voltage across the emitter-base. As a result, the base current (IB) increases. Consequently, the collector current (IC) increases p times. This increases the voltage drop across RC which in mm decreases the collector-emitter voltage (VCE). Therefore, the input signal in the positive direction produces an amplified signal in the negative direction at the output. Hence, the output signal is reversed by 180° as shown in figure (b).

During the negative half cycle
Input signal (Vs) decreases the forward voltage across the emitter-base. As a result, base current (IB) decreases and in turn increases the collector current (IC). The increase in collector current (IC) decreases the potential drop across Rc and increases the collector-emitter voltage ( VCE). Thus, the input signal in the negative direction produces an amplified signal in the positive direction at the output. Therefore, 180° phase reversal is observed during the negative half cycle of the input signal.

Tamil Nadu 12th Physics Model Question Paper 1 English Medium

[OR]

Question 38.
(b) Explain the three modes of propagation of electromagnetic waves through space.
Answer:
Propagation of electromagnetic waves:
The electromagnetic wave transmitted by the transmitter travels in three different modes to reach the receiver according to its frequency range:
1. Ground wave propagation (or) surface wave propagation (nearly 2 kHz to 2 MHz)
2. Sky wave propagation (or) ionospheric propagation (nearly 3 MHz to 30 MHz)
3. Space wave propagation (nearly 30 MHz to 400 GHz)

1. Ground wave propagation:
If the electromagnetic waves transmitted by the transmitter glide over the surface of the earth to reach the receiver, then the propagation is called ground wave propagation. The corresponding waves are called ground waves or surface waves.

Both transmitting and receiving antennas must be close to the earth. The size of the antenna plays a major role in deciding the efficiency of the radiation of signals. During transmission, the electrical signals are attenuated over a distance. Some reasons for attenuation are as follows:
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 27
Increasing distance: The attenuation of the signal depends on

  • power of the transmitter
  • frequency of the transmitter, and
  • condition of the earth surface.

Absorption of energy by the Earth: When the transmitted signal in the form of EM wave is in contact with the Earth, it induces charges in the Earth and constitutes a current. Due to this, the earth behaves like a leaky capacitor which leads to the attenuation of the wave.

Tilting of the wave: As the wave progresses, the wavefront starts gradually tilting according to the curvature of the Earth. This increase in the ti It decreases the electric field strength of the wave. Finally, at some distance, the surface wave dies out due to energy loss.

The frequency of the ground waves is mostly less than 2 MHz as high frequency waves undergo more absorption of energy at the earth’s atmosphere. The medium wave signals received during the day time use surface wave propagation.

It is mainly used in local broadcasting, radio navigation, for ship-to-ship, ship-to-shore communication and mobile communication.

2. Sky Wave Propagation:
The mode of propagation in which the electromagnetic waves radiated from an antenna, directed upwards at large angles gets reflected by the ionosphere back to earth is called sky wave propagation or ionospheric propagation. The corresponding waves are called sky waves.

The frequency range of EM waves in this mode of propagation is 3 to 30 MHz. EM waves of frequency more than 30 MHz can easily penetrate through the ionosphere and does not undergo reflection. It is used for short wave broadcast services. Medium and high frequencies are for long-distance radio communication. Extremely long distance communication is also possible as the radio waves can undergo multiple reflections between the earth and the ionosphere. A single reflection helps the radio waves to travel a distance of approximately 4000 km.
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 28
Ionosphere acts as a reflecting surface. It is at a distance of approximately 50 km and spreads up to 400 km above the Earth surface. Due to the absorption of ultraviolet rays, cosmic ray, and other high energy radiations like a, p rays from sun, the air molecules in the ionosphere get ionized. This produces charged ions and these ions provide a reflecting medium for the reflection of radio waves or communication waves back to earth within the permitted frequency range. The phenomenon of bending the radio waves back to earth is nothing but the total internal reflection.

3. Space wave propagation:
The process of sending and receiving information signal through space is called space wave communication. The electromagnetic waves of very high frequencies above 30 MHz are called as space waves. These waves travel in a straight line from the transmitter to the receiver. Hence, it is used for a line of sight communication (LOS).
Tamil Nadu 12th Physics Model Question Paper 1 English Medium - 29
For high frequencies, the transmission towers must be high enough so that the transmitted and received signals (direct waves) will not encounter the curvature of the earth and hence travel with less attenuation and loss of signal strength. Certain waves reach the receiver after getting reflected from the ground.

Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium

Students can Download Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium Pdf, Tamil Nadu 12th Chemistry Model Question Papers helps you to revise the complete Tamilnadu State Board New Syllabus and score more marks in your examinations.

TN State Board 12th Chemistry Model Question Paper 4 English Medium

Instructions:

  1. The question paper comprises of four parts
  2. You are to attempt all the parts. An internal choice of questions is provided wherever: applicable
  3. All questions of Part I, II, III, and IV are to be attempted separately
  4. Question numbers 1 to 15 in Part I are Multiple choice Questions of one mark each.  These are to be answered by choosing the most suitable answer from the given four alternatives and writing the option code and the corresponding answer
  5. Question numbers 16 to 24 in Part II are two-mark questions. These are lo be answered in about one or two sentences.
  6. Question numbers 25 to 33 in Part III are three-mark questions. These are lo be answered in about three to five short sentences.
  7. Question numbers 34 to 38 in Part IV are five-mark questions. These are lo be answered in detail. Draw diagrams wherever necessary.

Time: 3 Hours
Maximum Marks: 70

Part-I

Answer all the questions. Choose the correct answer. [15 × 1 = 15]

Question 1.
The metal oxide which cannot be reduced to metal by carbon is ………………….
(a) PbO
(b) Al2O3
(C) ZnO
(d) FeO
Answer:
(b) Al2O3

Question 2.
Compounds used as an eye lotion .
(a) H3BO3
(b) HBO2
(C) H2B4O7
(d) B2O3
Answer:
(a) H3BO3

Question 3.
Which one of the following orders is correct for the bond dissociation enthalpy of halogen molecules?
(a) Br 2> I2 > F2 > Cl2
(b) F2 > Cl2 > Br2 > I2
(c) I2 > Br2 > Cl2 > F2
(d) Cl2 > Br2 > F2 > I2
Answer:
(d) Cl2 > Br2 > F2 > I2

Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium

Question 4.
Consider the following statements.
(i) The melting point decreases from Scandium to Vanadium in 3d series.
(ii) In 3d transition series, atomic radius decreases from Sc to V and upto copper atomic radius nearly remains the same.
(iii) As we move down in 3d transition series, atomic radius increases.
Which of the above statements is/are incorrect?
(a) i only
(b) ii only
(c) iii only
(d) i, ii and iii
Answer:
(a) i only

Question 5.
Which complex is used as an antitumor drug in cancer treatment?
(a) Ca – EDTA chelate
(b) EDTA
(c) Ti Cl4 + Al(C2H5)3
(d) Cis – Platin
Answer:
(b) EDTA

Question 6.
The number of unit cells in 8 gm of an element X ( atomic mass 40) which crystallizes in bcc
pattern is (NA is the Avogadro number) ………..
(a) 6.023 x 1023
(b) 6.023 x 1022
(c) 60.23 x 1023
(d) \(\left(\frac{6.023 \times 10^{23}}{8 \times 40}\right)\)

Hint: In bcc unit cell, 2 atoms = 1 unit cell
Number of atoms in 8g of element is Number of moles = \(\frac{8 g}{40 g, \mathrm{mol}^{-1}}\) = 0.2mol
1 mole contains 6.023 x 1023 atoms 40g,mol
0.2 mole contains 0.2 x 6.023 x 1023 atoms
\(\left(\frac{1 \text { unit cell }}{2 \text { atoms }}\right)\) x 0.2 x 6.023 xio23 = 6.023 x 1022 unit cells

Question 7.
Among the following graphs showing variation of rate constant with temperature (T) for a reaction, the one that exhibits Arrhenius behavior over the entire temperature range is …………
Answer:
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 1
Solution:
k = Ae-(Ea/RT)
lnk = \(\ln \mathrm{A}-\left(\frac{\mathrm{E}_{\mathrm{a}}}{\mathrm{R}}\right)\left(\frac{1}{\mathrm{T}}\right)\)
this equation is in the form of a straight line equation y = c + m x
a plot of lnk vs (1/T) is a straight line with negative slope.

Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium

Question 8.
4Na+O2 → 2Na2O
Na2O + H2O → 2NaOH
In the given reaction, the oxide of sodium is …………..
(a) Acidic
(b) Basic
(c) Amphoteric
(d) Neutral
Answer:
(b) Basic
Solution:
Na2O form NaOH so that it is basic oxide.

Question 9.
How many faradays of electricity are required for the following reaction to occur
MnO4 → Mn2+
(a) 5F
(b)3F
(e) 1F
(d) 7F
Answer:
(a) 5F
Hint: 7MnO4 + 5e → Mn2+4H2O
5 moles of electrons i.e., 5F charge is required.

Question 10.
Match the following:
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 2
Answer:
(a) A – (iv), B – (i), C – (ii), D – (iii)

Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium

Question 11.
Which of the following is not the product of dehydration of
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 3
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 4
Answer:
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 5

Question 12.
Which one of the following reaction is an example of disproportionation reaction?
(a) Aldol condensation
(b) cannizaro reaction
(c) Benzoin condensation
(d) none of these
Answer:
(b) cannizaro reaction
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 6

Question 13.
The correct order of basic strength in the case of substituted ethyl amines is ………
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 7
Answer:
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 8

Question 14.
Assertion: A solution of sucrose in water is dextrorotatory. But on hydrolysis in the presence
of little hydrochloric acid, it becomes levorotatory. –
Reason: Sucrose hydrolysis gives unequal amounts of glucose and fructose. As a result of this – change in sign of rotation is observed.
(a) If both accretion and reason are true and reason is the correct explanation of assertion
(b) If both assertion and reason are true but reason is not the correct explanation of assertion
(c) If assertion is true but reason is false
(d) if both assertion and reason are false
Answer:
(a) If both accretion and reason are true and reason is the correct explanation of assertion

Question 15.
The correct structure of the drug paracetamol is ……….
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium – 9
Answer:
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 31

Part – II

Answer any six questions. Question No. 20 is compulsory. [6 x 2 = 12]

Question 16.
What are the various steps involved in extraction of pure metals from their ores?
Answer:
The extraction of pure metals from the concentrated ores is carried out in two steps:

  • Conversion of the ore into oxides of the metal of interest.
  • Reduction of the metal oxides to elemental metals.

Question 17.
Why white phosphorous is also known as yellow phosphorous?
Answer:
The freshly prepared white phosphoms is colourless but becomes pale yellow due to formation of a layer of red phosphorus upon standing. Hence it is also known as yellow phosphoms.

Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium

Question 18.
Give an example of coordination compound used in medicine.
Answer:
Medical uses of coordination compounds : –

  • Ca-EDTA chelate, is used in the treatment of lead and radioactive poisoning. That is for removing
    lead and radiactive metal ions from the body.
  • Cis-platin is used as an antitumor drug in cancer treatment.

Question 19.
Give the examples for a zero order reaction.
Answer:
Examples for a zero order reaction:
(i) Photochemical reaction between H2 and Cl2
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 10

(ii) Decomposition of N20 on hot platinum surface
N2 (g) ⇌ N2 + 1/2O2(g)

(iii) Iodination of acetone in acid medium is zero order with respect to iodine.
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 11

Question 20.
Write the overall redox reaction which takes place in the galvanic cell,
Pt(s) | Fe2+(aq),Fe3+(aq) | MnO4(aq), H+(aq),Mn2+ (aq) | Pt(s)
Answer:
At Anode half cell : 5Fe2+(aq) → 5Fe3+(aq) + 5e
At cathode half cell : MnO4(aq) + 8H+(aq) + 5e → Mn2+(aq) + 4H2O(l)
Overall redox reaction : 5Fe2+(aq) + MnO4(aq) + 8H+(aq)→ 5Fe3+(aq) + Mn2+(aq) + 4H2O(l)

Question 21.
In a coagulation experiment 10 mL of a colloid (X) is mixed with distilled water and 0.1M solution of an electrolyte AB so that the volume is 20 mL. It was found that all solutions containing more than 6.6 mL of AB coagulate with in 5 minutes. What is the flocculation values of AB for sol (X)?
Answer:
A minimum of 6.6mL of AB is required to coagulate the sol.
The moles of AB in the sol is, \(\frac{6.6 \times 0.01}{20}\) = 0.0033 moles
This means that a minimum of 0.033 moles or 0.0033 x 1000 = 3.3 milli moles are required
for coagulating one litre of sol.
Flocculation value of AB for X = 3.3

Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium

Question 22.
Explain Rosenmund reduction.
Answer:
Aldehydes can be prepared by the hydrogenation of acid chloride, in the presence of palladium supported by Barium sulphate. This reaction is called Rosenmund reduction.
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 12
In the above reaction, BaS04 act as a catalytic poison to palladium catalyst, so that aldehyde cannot be further reduced to alcohol.

Question 23.
‘What are the uses of aliphatic nitro compounds.
Answer:
(i) Nitromethane is used as a fuel for cars.
(ii) Chloropicrin (CCl3NO2) is used as an insecticide
(iii) Nitroethane is used as a fuel additive and precursor to explosive and they are good solvents for polymers, cellulose ester, synthetic rubber and dyes etc.

Question 24.
Classify the following as linear, branched or cross linked polymers
(a) Bakelite
(b) Nylon
(c) polythene
Answer:
(a) Bakelite – cross linked polymer
(b) Nylon – Linear polymer
(c) Polythene – Linear polymer

Part – III

Answer any six questions. Question No. 32 is compulsory. [6 x 3 = 18]

Question 25.
A hydride of 2nd period alkali metal (A) on reaction with compound of Boron (B) to give a reducing agent (C). identify A, B and C.
Answer:
(i) A hydride of 2nd period alkali metal (A) is lithium hydride (LiH).
(ii) Lithium hydride (A) reacts with diborane (B) to give lithiumborohydride (C) which act as reducing agent.
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 13

Question 26.
Discuss the uses of phosphine.
Answer:
Phosphine is used for producing smoke screen as it gives large smoke. In a ship, a pierced . container with a mixture of calcium carbide and calcium phosphide, liberates phosphine and acetylene when thrown into sea. The liberated phosphine catches fire and ignites acetylene. These burning gases serves as a signal to the approaching ships. This is known as Holmes signal.

Question 27.
Calculate the percentage efficiency of packing in case of body centered cubic crystal.
Answer:
Packing efficiency : In body centered cubic arrangement the spheres are touching along the leading diagonal of the cube as shown in the figure.
In ∆ABC,
AC2 = AB2 + BC2
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 14In∆ACG,
AG2 = AC2 + CG2
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 15
∴ Volume of the sphere with radius ‘r’
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 16
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 17
Number of spheres belong to a unit cell in bec arrangement is equal to two and hence the total volume of all spheres.
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 18
i. e., 68% of the available volume is occupied.The available space is used more efficiently than in simple cubic packing.

Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium

Question 28.
H3BO3 accepts hydroxide ion from water as shown below
H3BO3 (aq) + H2O((l) ⇌ B(OH)4 + H+
Predict the nature of H3BO3 using Lewis concept.
Answer:
Boric acid is also called as hydrogen borate or orthoboric acid. It is a weak mono basic Lewis acid of boron and it is written as B(OH)3 It accepts hydroxyl (OH) ion from water. It does not dissociate to give hydronium (H3O+) ion rather forms metaborate ion and this ions in turn give H3O+ ion.
B(OH)3 + H2O ⇌ [B(OH)4] + H3O+
Hence it is considered as weak acid.

Question 29.
Explain graphical representation of chemical adsorption and physical adsorption.
Answer:
(i) Adsorption isotherms represents the variation of adsorption at constant temperature.
(ii) When amount of adsorption is plotted versus temperature at constant pressure is called adsorption isobar
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 19
(iii) In physical adsorption x/m decreases with increase in T. But in chemical adsorption x/m increases with rise in temperature and then decreases. The increase illustrate the requirement of activation of the surface for adsorption is due to the fact that formation of activated complex require certain energy. The decrease at high temperature is due to desorption, as the kinetic energy of the adsorbate increases.

Question 30.
Mention the uses of Glycerol.
Answer:

  • Glycerol is used as a sweetening agent in confectionery and beverages.
  • It is used in the manufacture of cosmetics and transparent soaps.
  • It is used in making printing inks and stamp pad ink and lubricant for watches and clocks.
  • It is used in the manufacture of explosive like dynamite and cordite by mixing it with china clay.

Question 31.
Give the differences between primary and secondary structure of proteins.
Answer:
Primary structure of proteins:

  • Linear sequence of amino acids
  • Composed of peptide bonds formed between amino acids.
  • Formed during translation.
  • Involved in post – translational modifications.

Secondary structure of proteins :

  • Folding of the peptide chain into an a-helix and p-sheet.
  • Encompasses hydrogen bonds
  • Forms collagen, elastin action, myosin, and keratin – like fibres.
  • Involved in forming structures such as cartilages, ligaments, skins etc.

Question 32.
Draw the structure of (i) procaine (ii) Lidocaine
Answer:
(i) Procaine
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 20
(ii) Lidocaine
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 21

Question 33.
Explain the variation in E0M3+/M2+ 3d series.
Answer:
1. In transition series, as we move down from Ti to Zn, the standard reduction potential \(\mathbf{E}^{0} \mathrm{M}^{2+} / \mathrm{M}^{3+}\) value is approaching towards less negative value and copper has a positive reduction potential, i.e. elemental copper is more stable than Cu2+ .

2. \(\mathrm{E}^{0} \mathrm{m}^{2+} / \mathrm{M}\) value for manganese and zinc are more negative than regular trend. It is due to extra stability arises due to the half filled d5 configuration in Mn2+ and completely filled d10 configuration in Zn2+.

3. The standard electrode potential for the M3+ / M2+ half cell gives the relative stability between M3+ and M2+.

4. The high reduction potential of Mn3+ / Mn2+ indicates Mn2+ is more stable than Mn3+.

5. For Fe3+ /Fe2+ the reductionpotential is 0.77V, and this low value indicates that both Fe3+ and Fe2+ can exist under normal condition.

6. Mn3+ has a 3d4 configuration while that of Mn2+ is 3d5. The extra stability associated with a half filled d sub-shell makes the reduction of Mn very feasible [E0 = +1.51 V]

Part – IV

Answer all the questions. [5 x 5 = 25]

Question 34.
(a) (i) Describe a method for refining nickel. (3)
(ii) Why group 18 elements are called inert gases?-Write the general electronic configuration of group 18 elements. (2)
[OR]
(b) (i) Give the uses of helium. (3)
(ii) Ni (II) compounds are more stable than Pt (II) compounds. Give reason. (2)
Answer:
(a) (i) The impure nickel is heated in a stream of carbon monoxide at around 350 K. The nickel
reacts with the CO to form a highly volatile nickel tetracarbonyl. The solid impurities ‘ . are left behind.
Ni (s) + 4 CO (g) → Ni(CO)4 (g)
On heating the nickel tetracarbonyl around 460 K, the complex decomposes to give pure metal
Ni(CO)4(g) → Ni(s) + 4 CO (g)

(ii) The elements of group-18 have completely filled s and p orbitals, hence they are more stable and have least reactivity. Therefore group-18 elements are called inert gases. ns2np6 is the general electronic configuration of group 18 elements.

[OR]

(b) (i) Uses of helium.

  • Helium and oxygen mixture is used by divers in place of air oxygen mixture. This prevents the painful dangerous condition called bends.
  • Helium is used to provide inert atmosphere in electric arc welding of metals
  • Helium has lowest boiling point hence used in cryogenics (low temperature science).
  • It is much less denser than air and hence used for filling air balloons

(ii) The ionisation enthalpy values can be used to predict the thermodynamic stability of their compounds.
For Nickel, I.E1 + I.E2 = 737 + 1753
= 2490 kJ mol-1
For Platinum, I.E1 +I.E2 = 864+ 1791
= 2655 kJ mol-1
Since, the energy required to form Ni2+ is less than that of Pt2+ , Ni(II) compounds are thermodynamically more stable than Pt(II) compounds.

Question 35.
(a) (i) Arrange the following in order of increasing molar conductivity (3)
1. Mg[Cr(NH3)(Cl)5] . 2.[Cr(NH3)5Cl]3 [COF6]2 3. [Cr(NH3)3Cl3]
(ii) Silicon carbide is very hard. Justify this statement. (2)
[OR]
(b) (i) Write the rate law for the following reactions: (a) A reaction that is 3/2 order in x and zero order in y. (A) A reaction that is second order in NO and first order in Br2. (3)
(ii) Classify the following species into Lewis acids and Lewis bases and show how these can act as Lewis acid / Lewis base? (2)
(a) OHions (A) F (c) H+ (d) BCl3
Answer:
(a) (i) These complexes can ionise in solution as:
Mg[Cr(NH3)(Cl)5] = Mg2+ + [Cr(NH3)(Cl)5]2-
[Cr(NH3 )5Cl]3 [COF6]2 = [Cr(NH3)56Cl]2+ + [COF6]3-
[Cr(NH3)3Cl3] = does not ionize

As the number of ions in solution increases, their molar conductivity also increases.
Therefore, conductivity follows the order:
[Cr(NH3)3Cl3] < [Cr(NH3)5Cl]3 [COF < Mg[Cr(NH3)(Cl)5]

(ii) Silicon carbide is very hard. It is a covalent solid contains the atoms which are bound together in a three dimensional network entirely by covalent bonds. So the covalent network crystal siC is very hard and have high melting point.

[OR]

(b) (i)
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 22

(ii) (a) OH ions can donate an electron pair and act as Lewis base.
(b) F ions can donate an electron pair and act as Lewis base.
(c) H+ ions can accept an electron pair and act as Lewis base. .
(d) BCl3 can accept an electron pair since Boron atom is electron deficient. It is a Lewis acid.

Question 36.
(a) (z) Calculate pH of 10-7 MHCl. (3)
(ii) Define corrosion. Give one example. (2)
[OR]
(b) What is adsorption isotherm? Explain about Freundlich adsorption isotherm. (5)
Answer:
(a) (z) If we do not consider [H3O+ ] from the ionisation of H2O, then [H3O+ ] = [HCl] = 10-7 M i.e., pH = 7, which is a pH of a neutral solution. We know that HCl solution is acidic whatever may be the concentration of HCl i.e, the pH value should be less than 7. In this case the concentration of the acid is very low (10-7 M). Hence, the H3O+ (10-7 M) formed due to the auto ionisation of water cannot be neglected.
So, in this case we should consider [H3O+ ] from ionisation of H2 O
[H3O+ ] = 10-7 (from HCl) + 10-7 (from water)
= 10-7 (1+1)
= 2 x 10-7
pH = -log10[H3O+]
= log10 (2 x 10-7 )=—[log 2 + log10-7 ]
= – log 2 -(-7). 1og1010
= 7 – log 2
= 7 – 0.3010 = 6.6990
= 6.70

(ii) The redox process which causes the deterioration of metal is called corrosion.
Rusting of iron is an example of corrosion. It is an electro chemical process.

[OR]

(b) i. Adsorption isotherms represents the variation of adsorption at constant temperature. Adsorption isotherm can be studied quantitatively. ii. A plot between the amount of adsorbate adsorbed and pressure or concentration of adsorbate at constant temperature is called adsorption isotherms.

ii. Freundlich adsorption isotherm.
According to Freundlich \(\frac{\mathbf{x}}{\mathrm{m}}=\mathrm{k} \mathrm{P}^{1 / \mathrm{n}}\)
Where x is the amount of adsorbate (or) adsorbed on ‘m’ gm of adsorbent at a pressure of R k and n are constants. Value of ‘n’ is always less than unity.

iv. This equation is applicable for adsorption of gases on solid surfaces. The Same equation becomes \(\frac{\mathbf{x}}{\mathrm{m}}=\mathrm{k} \mathrm{P}^{1 / \mathrm{n}}\) kc when used for adsorption in solutions with ‘c’ as concentration.

v. These equation quantitatively predict the effect of pressure (or concentration) on the adsorption of gases (or adsorbates) at constant temperature.

vi. Taking log on both sides of equation
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 23
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 24

vii. Hence the intercept represents the value of log k and the slope \(\frac{b}{q}\) gives \(\frac{1}{n}\)

viii. This equation explains the increase of \(\frac{x}{m}\)with increase in pressure. But experimental values shows the deviation at low pressure.

ix. Limitations:
(a) This equation is purely empirical and valid over a limited pressure range.
(b) The value of k and n also found vary with temperatures. No theoretical explanations were given.

Question 37.
(a) An organic compound (A) of molecular formula C6H6O gives white precipitate with bromine water. (A) on reaction with NaOH gives (B). (B) reacts with methyl iodide in presence of dry ether gives (C) of molecular formula C7H/8O which will not liberate H2 gas with metallic Na. (C) on reaction with acetyl chloride gives (D) and (E) of formula which are position isomers. Identify A, B, C, D & E and explain the reaction. (5)

[OR]

(A) (i) What happens when n-propyl benzene is oxidised using H+ / KMnO4?(2)
(ii) Identify A, B ,and C.
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 25
Answer:
1. An organic compound gives white precipitate with bromine water means it must be a phenol. From the molecular formula it is identified as C6H5OH.

2. Phenol on reaction with NaOH gives (B) as sodium phenoxide C6H5ONa.
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 26

3. Sodium phenoxide on reaction with methyl iodide in the pressure of dry ether undergo Williamsons synthesis and gives Anisole as (C).
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 27

4. Anisole on reaction with acetyl chloride undergoes Friedel Craft’s acetylation and yield o-methoxy acetophenone and p-methoxy acetophenone as (D) and (E).
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 28
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 29
(b)
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 30

Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium

Question 38.
(a) (i) How will you distinguish between primary secondary and tertiary alphatic amines. (3)
(ii) Convert Benzene diazonium chloride into phenol. (2)
[OR]
(b) (i) What are the functions of lipids in living organism? (3)
(ii) What is Orion? Give its preparation and use. (2)
Answer:
(a) (i)
Tamil Nadu 12th Chemistry Model Question Paper 4 English Medium - 32

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Students can Download Computer Science Chapter 11 Database Concept Questions and Answers, Notes Pdf, Samacheer Kalvi 12th Computer Science Book Solutions Guide Pdf helps you to revise the complete Tamilnadu State Board New Syllabus and score more marks in your examinations.

Tamilnadu Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Samacheer Kalvi 12th Computer Science Database Concept Text Book Back Questions and Answers

PART – 1
I. Choose The Best Answer

Question 1.
What is the acronym of DBMS?
Answer:
(a) DataBase Management Symbol
(b) Database Managing System
(c) DataBase Management System
(d) DataBasic Management System
Answer:
(c) DataBase Management System

Question 2.
A table is known as ……………………..
(a) tuple
(b) attribute
(c) relation
(d) entity
Answer:
(c) relation

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 3.
Which database model represents parent-child relationship?
(a) Relational
(b) Network
(c) Hierarchical
(d) Object
Answer:
(c) Hierarchical

Question 4.
Relational database model was first proposed by ……………………..
(a) E F Codd
(b) E E Codd
(c) c) E F Cadd
(d) E F Codder
Answer:
(a) E F Codd

Question 5.
What type of relationship does hierarchical model represents?
(a) one-to-one
(b) one-to-many
(c) many-to-one
(d) many-to-many
Answer:
(b) one-to-many

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 6.
Who is called Father of Relational Database from the following?
(a) Chris Date
(b) Hugh Darween
(c) Edgar Frank Codd
(d) Edgar Frank Cadd
Answer:
(c) Edgar Frank Codd

Question 7.
Which of the following is an RDBMS?
(a) Dbase
(b) Foxpro
(c) Microsoft Access
(d) SQLite
Answer:
(d) SQLite

Question 8.
What symbol is used for SELECT statement?
(a) σ
(b) π
(c) X
(d) Ω
Answer:
(a) σ

Question 9.
A tuple is also known as ………………………
(a) table
(b) row
(c) attribute
(d) field
Answer:
(b) row

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 10.
Who developed ER model?
(a) Chen
(b) EF Codd
(c) Chend
(d) Chand
Answer:
(a) Chen

PART – II
II. Answer The Following Questions

Question 1.
Mention few examples of a database?
Answer:
Examples of popular DBMS: Dbase, FoxPro

Question 2.
List some examples of RDBMS?
Answer:
SQL server, Oracle, mysql, MariaDB, SQLite.

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 3.
What is data consistency?
Answer:
Data Consistency
On live data, it is being continuously updated and added, maintaining the consistency of data can become a challenge. But DBMS handles it by itself. Data Consistency means that data values are the same at all instances of a database

Question 4.
What is the difference between Hierarchical and Network data model?
Answer:
Network database model is an extended form of hierarchical data model. The difference between hierarchical and Network data model is :

  1. In hierarchical model, a child record has only one parent node,
  2. In a Network model, a child may have many parent nodes. It represents the data in many-to-many relationships.
  3. This model is easier and faster to access the data.

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 5.
What is normalization?
Answer:

  1. Normalization is a process of organizing the data in the database to avoid data redundancy and to improve data integrity.
  2. Database normalization was first proposed by Dr. Edgar F Codd as an integral part of RDBMS. These rules are known as E F Codd Rules.

PART – III
III. Answer The Following Questions

Question 1.
What is the difference between Select and Project command?
Answer:
Select:
THE SELECT operation is used for selecting a subset with tuples according to a given condition. Select filters out all tuples that do not satisfy C.

Project:
The projection eliminates all attributes of the input relation but those mentioned in the projection list. The projection method defines a relation that contains a vertical subset of Relation.

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 2.
What is the role of DBA?
Answer:
Database Administrator

  1. Database Administrator or DBA is the one who manages the complete database management system.
  2. DBA takes care of the security of the DBMS, managing the license keys, managing user accounts and access etc.

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 3.
Explain Cartesian Product with a suitable example?
PRODUCT OR CARTESIAN PRODUCT (Symbol: X)
Answer:
Cross product is a way of combining two relations. The resulting relation contains, both relations being combined.
A × B means A times B, where the relation A and B have different attributes.
This type of operation is helpful to merge columns from two relations.
Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept img 1

Question 4.
Explain Object Model with example?
Answer:
Object Model

  1. Object model stores the data in the form of objects, attributes and methods, classes and Inheritance.
  2. O This model handles more complex applications, such as Geographic information System (GIS), scientific experiments, engineering design and manufacturing.
  3. It is used in file Management System.
  4. It represents real world objects, attributes and behaviors. It provides a clear modular structure.
  5. It is easy to maintain and modify the existing code.

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept img 1
An example of the Object model is Shape, Circle, Rectangle and Triangle are all objects in this model.

  1. Circle has the attribute radius.
  2. Rectangle has the attributes length and breadth.
  3. Triangle has the attributes base and height.
  4. The objects Circle, Rectangle and Triangle inherit from the object Shape.

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 5.
Write a note on different types of DBMS users?
Answer:
Types of DBMS Users
(i) Database Administrator:
Database Administrator or DBA is the one who manages the complete database management system. DBA takes care of the security of the DBMS, managing the license keys, managing user accounts and access etc.

(ii) Application Programmers or Software Developers:
This user group is involved in developing and designing the parts of DBMS.

(iii) End User:
End users are the one who store, retrieve, update and delete data.

(iv) Database designers: are responsible for identifying the data to be stored in the database for choosing appropriate structures to represent and store the data.

PART – IV
IV. Answer The Following Questions

Question 1.
Explain the different types of data model?
Answer:
Types of Data Model
Following are the different types of a Data Model

  1. Hierarchical Model
  2. Relational Model
  3. Network Database Model
  4. Entity Relationship Model
  5. Object Model

1. Hierarchical Model
Hierarchical model was developed by IBM as Information Management System.
In Hierarchical model, data is represented as a simple tree like structure form. This model represents a one-to-many relationship i.e. parent-child relationship. One child can have only one parent but one parent can have many children. This model is mainly used in IBM Main Frame computers.
Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept img 3

2. Relational Model
The Relational Database model was first proposed by E.F. Codd in 1970 . Nowadays, it is the most widespread data model used for database applications around the world.
The basic structure of data in relational model is tables (relations). All the information’s related to a particular type is stored in rows of that table. Hence tables are also known as relations in a relational model. A relation key is an attribute which uniquely identifies a particular tuple (row in a relation (table)).
Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept img 23

3. Network Model
Network database model is an extended form of hierarchical data model. The difference between hierarchical and-Network data model is :

  1. In hierarchical model, a child record has only one parent node,
  2. In a Network model, a child may have many parent nodes. It represents the data in many-to-many relationships.
  3. This model is easier and faster to access the data.

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept img t
School represents the parent node
Library, Office and Staff room is a child to school (parent node)
Student is a child to library, office and staff room (one to many relationship)

4. Entity Relationship Model. (ER model)
In this database model, relationship are created by dividing the object into entity and its characteristics into attributes.
It was developed by Chen in 1976. This model is useful in developing a conceptual design for the database. It is very simple and easy to design logical view of data. The developer can easily understand the system by looking at ER Model constructed. Rectangle represents the entities. E.g. Doctor and Patient

Ellipse represents the attributes E.g. D-id, D-name, P-id, P-name. Attributes describes the characteristics and each entity becomes a major part of the data stored in the database. Diamond represents the relationship in ER diagrams E.g. Doctor diagnosis the Patient
Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept img 5

5. Object Model
Object model stores the data in the form of objects, attributes and methods, classes and Inheritance. This model handles more complex applications, such as Geographic information System (GIS), scientific experiments, engineering design and manufacturing. It is used in file Management System. It represents real world objects, attributes and behaviors. It provides a clear modular structure. It is easy to maintain and modify the existing code.

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 2.
Explain the different types of relationship mapping?
Answer:
Types of Relationships:
Following are the types of relationships used in a database.

  1. One-to-One Relationship
  2. One-to-Many Relationship
  3. Many-to-One Relationship
  4. Many-to-Many Relationship

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept img 6

1. One-to-One Relationship
In One-to-One Relationship, one entity is related with only one other entity. One row in a table is linked with only one row in another table and vice versa.
For example: A student can have only one exam number.

2. One-to-Many Relationship
In One-to-Many relationship, one entity is related to many other entities. One row in a table A is linked to many rows in a table B, but one row in a table B is linked to only one row in table A. For example: One Department has many staff members.
Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept img 7

3. Many-to-One Relationship
In Many-to-One Relationship, many entities can be related with only one in the other entity. For example: A number of staff members working in one Department. Multiple rows in staff members table is related with only one row in Department table.
Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept img 8

4. Many-to-Many Relationship
Amany-to-many relationship occurs when multiple records in a table are associated with multiple records in another table.

Example 1: Customers and Product:
Customers can purchase various products and Products can be purchased by many customers

Example 2: Students and Courses:
A student can register for many Courses and a Course may include many students

Example 3: Books and Student:
Many Books in students.
Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept img 9

Question 3.
Differentiate DBMS and RDBMS?
Answer:
Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept img 10

Question 4.
Explain the different operators in Relational algebra with suitable examples?
Answer:
Relational Algebra Operations from Set Theory

  1. UNION (∪)
  2. INTERSECTION (∩)
  3. DIFFERENCE (-)
  4. CARTESIAN PRODUCT (X)

SELECT (symbol: σ)
General form σ<sub>c</sub> ( R) with a relation R and a condition C on the attributes of R.
The SELECT operation is used for selecting a subset with tuples according to a given condition. Select filters out all tuples that do not satisfy C.
Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept img 11

PROJECT (symbol : II)
The projection eliminates all attributes of the input relation but those mentioned in the projection list.
Example 1 using Table A
π<sub>course</sub> (STUDENT)
Result
Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept img 12
Course Big Data R language PythonProgramming
Note: duplicate row is removed in the result UNION (Symbol :u)
It includes all tuples that are in tables A or in B. It also eliminates duplicates. Set A Union Set B would be expressed asAuB

Example 2:
Consider the following tables
Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept img 13
Result
Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept img 14

SET DIFFERENCE ( Symbol: -)
The result of A – B, is a relation which includes all tuples that are in A but not in B. The attribute name of A has to match with the attribute name in B.

Example 4:
( using Table B)
Result
Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept img 15
INTERSECTION (symbol: ∩) A∩B
Defines a relation consisting of a set of all tuple that are in both in A and B. However, A and B must be union-compatible

Example 5:
(using Table B)
Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept img u

PRODUCT OR CARTESIAN PRODUCT (Symbol: X)
Cross product is a way of combining two relations. The resulting relation contains, both relations being combined.
A × B means A times B, where the relation A and B have different attributes.
This type of operation is helpful to merge columns from two relations.
Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept img 17

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept img 18
Cartesian product : Table A × Table B
Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept img 19

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 5.
Explain the characteristics of DBMS?
Characteristics of Database Management System
Answer:
Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept img 20

Samacheer kalvi 12th Computer Science Database Concept Additional Questions and Answers

PART – I
I. Choose The Correct Answer

Question 1.
…………………… are raw facts stored in a computer
(a) data
(b) Information
(c) row
(d) tuple
Answer:
(a) data

Question 2.
……………………. gives meaningful information
(a) data
(b) Information
(c) row
(d) tuple
Answer:
(b) Information

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 3.
……………………. is a repository collection of related data
(a) data
(b) Information
(c) database
(d) tuple
Answer:
(c) database

Question 4.
……………………… is a software that allows us to create, define and manipulate databases
(a) data
(b) Information
(c) DBMS
(d) Tuple
Answer:
(c) DBMS

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 5.
Which one of the following is not a characteristic of DBMS?
(a) Redundancy
(b) consistency
(c) Normalization
(d) Insecure
Answer:
(d) Insecure

Question 6.
Find the wrong statement about DBMS?
(a) segregation of application program
(b) Maximum data Redundancy
(c) Easy retrieval of data
(d) Reduced development time
Answer:
(b) Maximum data Redundancy

Question 7.
How many major components of DBMS are there?
(a) 2
(b) 3
(c) 4
(d) 5
Answer:
(d) 5

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 8.
Which one of the following is not a component of DBMS?
(a) Data
(b) Methods
(c) DataBase Access Language
(d) Modules
Answer:
(d) Modules

Question 9.
Which is the language used to write commands to access, insert, update data stored in database?
(a) DataBase Access Languages
(b) Javascript
(c) Basic
(d) Foxpro
Answer:
(a) DataBase Access Languages

Question 10.
A column is known as an ……………………….
Answer:
Attribute

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 11.
Entire collection of related data in one table, is referred to as ……………………… or …………………………
Answer:
File or Table

Question 12.
Each table ………………………. represents a Field
Answer:
column

Question 13.
Each ……………………… in table represents a record.
Answer:
row

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 14.
How many different types of a data model are there?
(a) 2
(b) 3
(c) 4
(d) 5
Answer:
(d) 5

Question 15.
Hierarchical Model was developed by ……………………….
(a) Apple
(b) IBM
(c) Microsoft
(d) Macromedia
Answer:
(b) IBM

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 16.
Which database Model is the extended form of hierarchical data Model?
(a) Network
(b) Relational
(c) Flat File
(d) Object
Answer:
(a) Network

Question 17.
1. Relational – (i) classes
2. object model – (ii) Mainframe
3. ER model – (iii) key
4. Hierarchical – (iv) Entity
(a) 1-iii, 2-i, 3-iv, 4-ii
(b) 1-i, 2-ii, 3-iii, 4-iv
(c) 1-iv, 2-iii, 3-i, 4-ii
(d) 1-iv, 2-ii, 3-i, 4-iii
Answer:
(a) 1-iii, 2-i, 3-iv, 4-ii

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 18.
The relational model was developed in the year ……………………..
(a) 1980
(b) 1970
(c) 1965
(d) 1985
Answer:
(b) 1970

Question 19.
…………………… uniquely identifies a particular tuple in a table
Answer:
Relation key

Question 20.
Which model establishes many to many relationships?
(a) Network
(b) Relational
(c) Hierarchical
(d) Object
Answer:
(a) Network

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 21.
ER Model Expand ………………………..
(a) Entry Relation
(b) Entity Relationship
(c) Entire Row
(d) Entity Row
Answer:
(b) Entity Relationship

Question 22.
ER Model was developed in the year …………………….
(a) 1978
(b) 1972
(c) 1976
(d) 1975
Answer:
(c) 1976

Question 23.
In ER Model, objects are said to be ……………………..
Answer:
entity

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 24.
Find the wrongly matched pair.
(a) Entities – Rectangle
(b) Ellipse – attributes
(c) Diamond – relationship
(d) row – square
Answer:
(d) row – square

Question 25.
…………………….. represents the relationship in ER diagrams.
Answer:
Diamonds

Question 26.
GIS stands for ………………………
Answer:
Geographic Information System

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 27.
Which model is used in file management systems?
(a) object
(b) Hierarchical
(c) Network
(d) ER
Answer:
(a) object

Question 28.
DBA means ………………….
Answer:
Database Administators

Question 29.
………………….. is one who manages the complete database management system
(a) Manager
(b) Engineer
(c) DBA
(d) Service Person
Answer:
(c) DBA

Question 30.
……………………. are the one who store, retrieve, update and delete data.
Answer:
End User

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 31.
Choosing appropriate structures to represent and store the data are the task of ……………………..
Answer:
database designer

Question 32.
RDBMS means ………………………..
(a) Relational Database Manipulation System
(b) Relational Database Management system
(c) Rapid DataBase Management Server
Answer:
(b) Relational Database Management system

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 33.
Pick the odd out.
Oracle, Foxpro, MariaDB, SQLite
Answer:
Foxpro

Question 34.
Find the true statement
(a) Data redundancy is exhibited by DBMS
(b) Data redundancy is not present in DBMS
Answer:
(a) Data redundancy is exhibited by DBMS

Question 35.
Find the false statement
(a) Distributed Databases supported by DBMS
(b) Distributed Databases supported by RDBMS
Answer:
(a) Distributed Databases supported by DBMS

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 36.
……………………. Model of data storage is used in DBMS.
Answer:
Navigational

Question 37.
In which database systems, transaction management is efficient?
(a) DBMS
(b) RDBMS
(c) ERDMS
(d) DBMS
Answer:
(b) RDBMS

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 38.
How many types of relationships are there?
(a) 1
(b) 2
(c) 3
(d) 4
Answer:
(d) 4

Question 39.
Identify which one of the following is an example for many to one relationship?
(a) student with exam number
(b) many staff members in one department
(c) customer, products
(d) Books and students
Answer:
(b) many staff members in one department

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 40.
…………………… is a procedural query language used to query the database tables using SQL
Answer:
Relational Algebra

Question 41.
Find the wrong pair
(a) Union U
(b) cartesian product P
(c) project n
(d) select o
Answer:
(b) cartesian product P

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 42.
Which method defines a relation that contains a vertical subset of relation?
(a) project
(b) select
(c) difference
(d) union
Answer:
(a) project

Question 43.
Duplicate row is removed in ……………………….
(a) o
(b) π
(c) x
(d) –
Answer:
(b) π

Question 44.
…………………. is used to merge columns from two relations.
(a) σ
(b) π
(c) x
(d) –
Answer:
(c) x

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 45.
…………………. is security from unauthorized users.
Answer:
Data Integrity

Question 46.
…………………. means duplication of data in a database.
Answer:
Redundancy.

PART- II
II. Answer The Following Questions

Question 1.
Differentiate data from Information?
Answer:
Data:
Data are raw facts stored in a computer. A data may contain any character, text, word or a number.
Example:
600006, DPI Campus, SCERT, Chennai, College Road

Information:
Information is formatted data, which allows to be utilized in a significant way. It gives meaningful information.
Example:
SCERT
College Road
DPI Campus
Chennai 600006

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 2.
Define database?
Answer:
Database is a repository collection of related data organized in a way that data can be easily accessed, managed and updated. Database can be a software or hardware based, with one sole purpose of storing data.

Question 3.
Name the components of DBMS?
Answer:
Components of DBMS:
The Database Management System can be divided into five major components as follows:

  1. Hardware
  2. Software
  3. Data
  4. Procedures/Methods
  5. Database Access Languages

Question 4.
Define Table?
Answer:
Table is the entire collection of related data in one table, referred to as a File or Table where the data is organized as row and column.

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 5.
Define row and column?
Answer:
Each row in a table represents a record, which is a set of data for each database entry. Each table column represents a Field, which groups each piece or item of data among the records into specific categories or types of data. Eg. StuNo., StuName, StuAge, StuClass, StuSec.

Question 6.
What is meant by data model?
Answer:
Data Model

  1. A data model describes how the data can be represented and accessed from a software after complete implementation
  2. It is a simple abstraction of complex real world data gathering environment.
  3. The main purpose of data model is to give an idea as how the final system or software will look like after development is completed..

Question 7.
Write note on relational Algebra?
Answer:
Relational Algebra is a procedural query language used to query the database tables using SQL. Relational algebra operations are performed recursively on a relation (table) to yield an output.

PART – III
III. Answer The Following Questions

Question 1.
Define DBMS?
Answer:
A DBMS is a software that allows us to create, define and manipulate database, allowing users to store, process and analyze data easily. DBMS provides us with an interface or a tool, to perform various operations to create a database, storing of data and for updating data, etc. DBMS also provides protection and security to the databases. It also maintains data consistency in case of multiple users.

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept

Question 2.
What are the advantages of DBMS?
Answer:
Advantages of DBMS

  1. Segregation of application program
  2. Minimal data duplication or Data Redundancy
  3. Easy retrieval of data using the Query Language
  4. Reduced development time and maintenance

PART – IV
IV. Answer The Following Questions

Question 1.
Explain the Various Components of DBMS?
Answer:
Components of DBMS:
The Database Management System can be divided into five major components as follows:

  1. Hardware
  2. Software
  3. Data
  4. Procedures/Methods
  5. Database Access Languages

Samacheer Kalvi 12th Computer Science Solutions Chapter 11 Database Concept img 21

1. Hardware:
The computer, hard disk, I/O channels for data, and any other physical component involved in storage of data

2. Software:
This main component is. a program that controls everything. The DBMS software is capable of understanding the Database Access Languages and interprets into database commands for execution.

3. Data:
It is that resource for which DBMS is designed. DBMS creation is to store and utilize data.

4. Procedures/Methods:
They are general instructions to use a database management system such as installation of DBMS, manage databases to take backups, report generation, etc.

5. DataBase Access Languages:
They are the languages used to write commands to access, insert, update and delete data stored in any database.

Samacheer Kalvi 12th Computer Science Solutions Chapter 10 Python Classes and Objects

Students can Download Computer Science Chapter 10 Python Classes and Objects Questions and Answers, Notes Pdf, Samacheer Kalvi 12th Computer Science Book Solutions Guide Pdf helps you to revise the complete Tamilnadu State Board New Syllabus and score more marks in your examinations.

Tamilnadu Samacheer Kalvi 12th Computer Science Solutions Chapter 10 Python Classes and Objects

Samacheer Kalvi 12th Computer Science Python Classes and Objects Text Book Back Questions and Answers

PART – 1
I. Choose The Best Answer

Question 1.
Which of the following are the key features of an Object Oriented Programming language?
(a) Constructor and Classes
(b) Constructor and Object
(c) Classes and Objects
(d) Constructor and Destructor
Answer:
(c) Classes and Objects

Question 2.
Functions defined inside a class:
(a) Functions
(b) Module
(c) Methods
(d) section
Answer:
(c) Methods

Samacheer Kalvi 12th Computer Science Solutions Chapter 10 Python Classes and Objects

Question 3.
Class members are accessed through which operator?
(a) &
(b) .
(c) #
(d) %
Answer:
(b) .

Question 4.
Which of the following method is automatically executed when an object is created?
(a) _object_( )
(b) _del( )_( )
(c) _func_( )
(d) _init_( )
Answer:
(d) _init_( )

Samacheer Kalvi 12th Computer Science Solutions Chapter 10 Python Classes and Objects

Question 5.
A private class variable is prefixed with
(a) _
(b) &&
(c) ##
(d) **
Answer:
(a) _

Question 6.
Which of the following method is used as destructor?
(a) _init_( )
(b) _dest_ ( )
(c) _rem_( )
(d) _del_( )
Answer:
(d) _del_( )

Samacheer Kalvi 12th Computer Science Solutions Chapter 10 Python Classes and Objects

Question 7.
Which of the following class declaration is correct?
(a) class class_name
(b) class class_name< >
(c) class class_name:
(d) class class_name[ ]
Answer:
(c) class class_name:

Question 8.
Which of the following is the output of the following program?
– class Student:
def_init_(self, name):
self.name=name
S=Student(“Tamil”)
(a) Error
(b) Tamil
(c) name
Answer:
(b) Tamil

Samacheer Kalvi 12th Computer Science Solutions Chapter 10 Python Classes and Objects

Question 9.
Which of the following is the private class variable?
(a) _num
(b) ##num
(c) $$num
(d) &&num
Answer:
(a) _num

Question 10.
The process of creating an object is called as:
(a) Constructor
(b) Destructor
(c) Initialize
(d) Instantiation
Answer:
(d) Instantiation

PART – II
II. Answer The Following Questions

Question 1.
What is class?
Answer:
Classes and Objects are the key features of Object Oriented Programming. Class is the main building block in Python. Object is a collection of data and function that act on those data. Class is a template for the object. According to the concept of Object Oriented Programming, objects are also called as instances of a class or class variable.

Samacheer Kalvi 12th Computer Science Solutions Chapter 10 Python Classes and Objects

Question 2.
What is instantiation?
Answer:
Once a class is created, next you should create an object or instance of that class. The process of creating object is called as “Class Instantiation”.
Syntax:
object_name = class_name( )

Question 3.
What is the output of the following program?
Answer:
class Sample:
_num=10
def disp(self):
print(self._num)
S=Sample( )
S.disp( )
print(S._num)
Output:
Error: Sample has no attribute S._num
10

Samacheer Kalvi 12th Computer Science Solutions Chapter 10 Python Classes and Objects

Question 4.
How will you create constructor in Python?
Answer:
In Python, there is a special function called “init” which act as a Constructor. It must begin and end with double underscore. This function will act as an ordinary function;
General format of init method (Constructor function)
def_init_(self.[args …………….]):
<statements>

Question 5.
What is the purpose of Destructor?
Answer:
Destructor is also a special method gets executed automatically when an object exit from the scope. It is just opposite to constructor. In Python, _del_( ) method is used as destructor.

PART – III
III. Answer The Following Questions

Question 1.
What are class members? How do you define it?
Answer:
In Python, a class is defined by using the keyword class. Every class has a unique name followed by a colon ( : ).
Syntax:
class class_name:
statement_1
statement_2
…………………
…………………
statement_n
Where, statement in a class definition may be a variable declaration, decision control, loop or even a function definition. Variables defined inside a class are called as “Class Variable” and functions are called as “Methods”. Class variable and methods are together known as members of the class. The class members should be accessed through objects or instance of class. A class can be defined anywhere in a Python program.
Example:
Program to define a class
class Sample:
x, y = 10, 20 # class variables
In the above code, name of the class is Sample and it has two variables x and y having the initial value 10 and 20 respectively. To access the values defined inside the class, you need an object or instance of the class.

Samacheer Kalvi 12th Computer Science Solutions Chapter 10 Python Classes and Objects

Question 2.
Write a class with two private class variables and print the sum using a method?
Answer:
class Sample:
def_init_(self,n1,n2):
self._n1=n1
self._n2=n2
def display(self):
print(“class variable 1:”, self._n1)
print(“class variable 2:”, self._n2)
print(“sum self._n1 + self._n2)
s = sample(10, 20)
s.display( )
Output:
class variable 1 : 10
class variable 2 : 20
sum : 30

Samacheer Kalvi 12th Computer Science Solutions Chapter 10 Python Classes and Objects

Question 3.
Find the error in the following program to get the given output?
class Fruits:
def_init_(self, f1, f2):
self.f1=f1
self.f2=f2
def display (self):
print(“Fruit 1 = %s, Fruit 2 = %s” %(self.fl, self.f2))
F = Fruits (‘Apple’, ‘Mango’)
del F.display
F.display( )
Output
Fruit 1 = Apple, Fruit 2 = Mango
Answer:
In line No. 8, del F.display will not come

Samacheer Kalvi 12th Computer Science Solutions Chapter 10 Python Classes and Objects

Question 4.
What is the output of the following program?
Answer:
class Greeting:
def_init_(self, name):
self._name = name
def display(self):
print(“Good Morning “, self._name)
obj=Greeting(‘Bindu Madhavan’)
obj.display( )
Output:
Bindu Madhavan Good Morning

Samacheer Kalvi 12th Computer Science Solutions Chapter 10 Python Classes and Objects

Question 5.
How do define constructor and destructor in Python?
Answer:
General format of init method (Constructor function)
def_init_(self.[args ……………….]):
<statements>
To define destructor:
_del_ ( ) method is used.

PART – IV
IV. Answer The Following Questions

Question 1.
Write a menu driven program to add or delete stationary items. You should use dictionary to store items and the brand?
Answer:
stationary = { }
while((ch == 1) or (ch == 2))
print(” 1. Add Item \n 2. Delete Item”)
ch = int(input(“Enter your choice “))
if(ch==1):
n = int(input(“Enter the number of items to be added in the stationary shop”))
for i in range(n):
item = input(“Enter an item “)
brand = input(“Enter the brand Name”)
stationary[item] = brand
print(stationary)
elif(ch == 2):
remitem = input(“Enter the item to be deleted from the shop”)
dict.pop(remitem)
print( stationary)
else:
print(“Invalid options. Type 1 to add items and 2 to remove items “)
ch = int(input(“Enter your choice :”)
Output:

  1. Add item
  2. Delete Item Enter your choice : 1

Enter the number of items to be added in the stationary shop : 2
Enter an item : Pen
Enter the brand Name : Trimax
Enter an item : Eraser
Enter the brand Name : Camlin
Pen : Trimax
Eraser : Camlin
Enter your choice : 2
Enter the item to be deleted from the shop : Eraser
Pen : Trimax
Enter your choice : 3
Invalid options. Type 1 to add items an 2 to remove items.

Practice Programs

Question 1.
Write a program using class to store name and marks of students in list and print total marks?
Answer:
class stud:
def_init_(self):
self.name=” ”
self.m1=0
self.m2=0
self.tot=0
def gdata(self):
self.name = input(“Enter your name”)
self.m1 = int(input(“Enter marks 1”))
self.m2 = int(input(“Enter marks2”))
self, tot = self.m1+self.m2
def disp(self):
print(self.name)
print(self.m1)
print(self.m2)
print(self.tot)
mlist = [ ]
st = stud( )
st.gdata( )
mlist. append(st)
for x in mlist:
x.disp( )
Output:
Enter your name Ram
Enter marks 1 100
Enter marks2 100
Ram 100 100 200

Samacheer Kalvi 12th Computer Science Solutions Chapter 10 Python Classes and Objects

Question 2.
Write a program using class to accept three sides of a triangle and print its area?
Answer:
class Tr:
def_init_(self, a, b, c):
self.a = float(a)
self.b = float(b)
self.c = float(c)
def area(self):
s = (self.a + self.b + self.c)/2
return((s*(s-self.a) * (s-self.b) * (s-self.c) ** 0.5)
a = input(“Enter side 1:”)
b = input(“Enter side2:”)
c = input(“Enter side3:”)
ans=Tr(a,b,c)
print(ans.area( ))
Output:
Enter side 1 : 3
Enter side 2 : 4
Enter side 3 : 5
6.0

Samacheer Kalvi 12th Computer Science Solutions Chapter 10 Python Classes and Objects

Question 3.
Write a menu driven program to read, display, add and subtract two distances?
Answer:
class Dist:
def_init_(self):
self, dist 1=0
self.dist 2=0
def read(self):
self.dist 1=int(input(“Enter distance 1”))
self.dist 2=int(input(“Enter distance 2”))
def disp(self):
print(“distance 1”, self.dist 1)
print(“distance 2”, self.dist 2)
def add(self):
print(“Total distances”, self.dist 1+self.dist 2)
def sub(self):
print(“Subtracted distance”, self.dist 1-self.dist 2)
d=Dist( )
choi = “y”
while(choi == “y”):
print(” 1. accept \n 2. Display \n 3. Total \n 4. Subtract”)
ch = int(input(“Enter your choice”))
if(ch==l):
d.read( )
elif(ch==2):
d.disp( )
elif(ch==3):
d.add( )
elif(ch==4):
d.sub( )
else:
print(“Invalid Input…”)
choi = input(“Do you want to continue”)
Output:

  1. Accept
  2. Display
  3. Add
  4. Subtract

Enter your choice : 3
Enter distance 1 : 100
Enter distance 2 : 75
Do you want to continue .. y

  1. Accept
  2. Display
  3. Add
  4. Subtract

Enter your choice : 3
Total distances : 175
Do you want to continue .. y

  1. Accept
  2. Display
  3. Add
  4. Subtract

Enter your choice : 2
Enter distance 1 : 100
Enter distance 2 : 75
Do you want to continue .. y

  1. Accept
  2. Display
  3. Add
  4. Sub

Enter your choice : 4
Subtracted distance : 25
Do you want to continue .. N

Samacheer kalvi 12th Computer Science Python Classes and Objects Additional Questions and Answers

PART – 1
1. Choose The Correct Answer

Question 1.
……………………. are also called as instances of a class or class variable.
Answer:
objects

Samacheer Kalvi 12th Computer Science Solutions Chapter 10 Python Classes and Objects

Question 2.
All integer variables used in python program is an object of class ……………………….
Answer:
int

Question 3.
All the string variables are of object of class ……………………..
Answer:
strings

Question 4.
class is defined by the keyword ………………………
Answer:
class

Samacheer Kalvi 12th Computer Science Solutions Chapter 10 Python Classes and Objects

Question 5.
A statement in a class definition may be a ………………………..
(a) variable declaration
(b) decision control
(c) loop
(d) all of these
Answer:
(d) all of these

Question 6.
………………….. and …………………. are called as members of the class
Answer:
class variables and methods

Question 7.
The first argument of the class method is ……………………….
(a) class
(b) func
(c) def
(d) self
Answer:
(d) self

Samacheer Kalvi 12th Computer Science Solutions Chapter 10 Python Classes and Objects

Question 8.
The statements defined inside the class must be properly indented.
True / false
Answer:
True

Question 9.
The init function should begin and end with
(a) underscore
(b) double underscore
(c) #
(d) S
Answer:
(b) double underscore

Samacheer Kalvi 12th Computer Science Solutions Chapter 10 Python Classes and Objects

Question 10.
…………………….. is used to initialize the class variables.
(a) constructor
(b) destructor
(c) class
(d) objects
Answer:
(a) constructor

Question 11.
Find the correct statement from the following.
(a) constructor function can be defined with arguments
(b) constructor function can be defined without arguments
(c) constructor function can be defined with or without argument
(d) constructor function cannot be defined
Answer:
(c) constructor function can be defined with or without argument

Samacheer Kalvi 12th Computer Science Solutions Chapter 10 Python Classes and Objects

Question 12.
…………………….. is a special function to gets executed automatically when an object exit from the scope.
(a) constructor
(b) init
(c) destructor
(d) object
Answer:
(c) destructor

Question 13.
The variables which are defined inside the class is by default.
(a) private
(b) public
(c) protected
(d) local
Answer:
(b) public

Samacheer Kalvi 12th Computer Science Solutions Chapter 10 Python Classes and Objects

Question 14.
Which variables can be accessed anywhere in the program using dot operator?
(a) private
(b) public
(c) protected
(d) auto
Answer:
(b) public

Question 15.
Which variables can be accessed only within the class?
(a) private
(b) public
(c) protected
(d) local
Answer:
(a) private

Samacheer Kalvi 12th Computer Science Solutions Chapter 10 Python Classes and Objects

Question 16.
Match the following
1. constructor – (i) def process(self)
2. Destructor – (ii) S.x
3. method – (iii) _del_(self)
4. object – (iv) _init_(self, num)
(a) 1-(iv) 2-(iii) 3-(i) 4-(ii)
(b) 1-(i) 2-(ii) 3-(iii) 4-(iv)
(c) 1-(iv) 2-(ii) 3-(i) 4-(iii)
(d) 1-(i) 2-(iii) 3-(iv) 4-(ii)
Answer:
(a) 1-(iv) 2-(iii) 3-(i) 4-(ii)

PART – II
II. Answer The Following Questions

Question 1.
Write note on self?
Answer:
The class method must have the first argument named as self. No need to pass a value for this argument when we call the method. Python provides its value automatically. Even if – a method takes no arguments, it should be defined with the first argument called self. If a method is defined to accept only one argument it will take it as two arguments ie. self and the defined argument.

Samacheer Kalvi 12th Computer Science Solutions Chapter 10 Python Classes and Objects

PART – III
III. Answer The Following Questions

Question 1.
Write the output for the program?
Answer:
class Sample:
def_init_(self, num):
print(“Constructor of class Sample…”)
self.num=num
print(“The value is num)
S=Sample(10)
Constructor of class sample…
The value is: 10

PART – IV
IV. Answer The Following Questions

Question 1.
Write a program to calculate area and circumference of a circle?
Answer:
class Circle:
pi=3.14
def_init_(self,radius):
self.radius=radius
def area(self):
return Circle.pi*(self.radius**2)
def circumference(self):
return 2*Circle.pi*self.radius
r = int(input(“Enter Radius:”))
C=Circle(r)
print(“The Area =”,C.area( ))
print(“The Circumference =”, C.circumference( ))
Output:
Enter Radius: 5
The Area = 78.5
The Circumference = 31.400000000000002

Samacheer Kalvi 12th Computer Science Solutions Chapter 10 Python Classes and Objects

Question 2.
Write a menu driven program that keeps record of books available in your school library?
Answer:
class Library:
def_init_(self):
self.bookname=””
self.author=””
def getdata(self):
self.bookname = input(“Enter Name of the Book: “)
self.author = input(“Enter Author of the Book: “)
def display(self):
print(“Name of the Book: “,self.bookname)
print(” Author of the Book: “,self.author)
print(“\n”)
book=[ ] #empty list
ch = ‘y’
while(ch= =’y’):
print(“1. Add New Book \n 2.Display Books”)
resp = int(input(“Enter your choice :”))
if(resp= =1):
L=Library( )
L.getdata( )
book.append(L)
elif(resp= =2):
for x in book:
x.display( )
else:
print(“Invalid input….”)
ch = input(“Do you want continue….”)
Output:

  1. Add New Book
  2. Display Books

Enter your choice : 1
Enter Name of the Book: Programming in C++
Enter Author of the Book: K. Kannan
Do you want continue….y

  1. Add New Book
  2. Display Books

Enter your choice : 1
Enter Name of the Book: Learn Python
Enter Author of the Book: V.G.Ramakrishnan
Do you want continue….y

  1. Add New Book
  2. Display Books

Enter your choice : 1
Enter Name of the Book: Advanced Python
Enter Author of the Book: Dr. Vidhya
Do you want continue….y

  1. Add New Book
  2. Display Books Enter your choice : 1

Enter Name of the Book: Working with OpenOffice
Enter Author of the Book: N.V.Gowrisankar
Do you want continue….y

  1. Add New Book
  2. Display Books Enter your choice : 1

Enter Name of the Book: Data Structure
Enter Author of the Book: K.Lenin
Do you want continue….y

  1. Add New Book
  2. Display Books

Enter your choice : 1
Enter Name of the Book: An Introduction to Database System
Enter Author of the Book: R.Sreenivasan
Do you want continue….y

  1. Add New Book
  2. Display Books Enter your choice : 2

Enter Name of the Book: Programming in C++
Enter Author of the Book: K. Kannan
Name of the Book: Learn Python
Author of the Book: V.G.Ramakrishnan
Name of the Book: Advanced Python
Author of the Book: Dr. Vidhya
Name of the Book: Working with OpenOffice
Author of the Book: N.V.Gowrisankar
Name of the Book: Data Structure
Author of the Book: K.Lenin
Name of the Book: An Introduction to Database System
Author of the Book: R.Sreenivasan
Do you want continue….n

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Students can Download Computer Science Chapter 4 Algorithmic Strategies Questions and Answers, Notes Pdf, Samacheer Kalvi 12th Computer Science Book Solutions Guide Pdf helps you to revise the complete Tamilnadu State Board New Syllabus and score more marks in your examinations.

Tamilnadu Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Samacheer Kalvi 12th Computer Science Algorithmic Strategies Text Book Back Questions and Answers

PART – I
I. Choose The Best Answer

Question 1.
The word comes from the name of a Persian mathematician Abu Jafar Mohammed ibn – i Musa al Khowarizmi is called?
(a) Flow chart
(b) Flow
(c) Algorithm
(d) Syntax
Answer:
(c) Algorithm

Question 2.
From the following sorting algorithms which algorithm needs the minimum number of swaps?
(a) Bubble sort
(b) Quick sort
(c) Merge sort
(d) Selection sort
Answer:
(d) Selection sort

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 3.
Two main measures for the efficiency of an algorithm are ……………………………
(a) Processor and memory
(b) Complexity and capacity
(c) Time and space
(d) Data and space
Answer:
(c) Time and space

Question 4.
The complexity of linear search algorithm is ……………………………
(a) O(n)
(b) O(log n)
(c) O(n2)
(d) O(n log n)
Answer:
(a) O(n)

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 5.
From the following sorting algorithms which has the lowest worst case complexity?
(a) Bubble sort
(b) Quick sort
(c) Merge sort
(d) Selection sort
Answer:
(c) Merge sort

Question 6.
Which of the following is not a stable sorting algorithm?
(a) Insertion sort
(b) Selection sort
(c) Bubble sort
(d) Merge sort
Answer:
(b) Selection sort

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 7.
Time complexity of bubble sort in best case is ……………………………
(a) θ(n)
(b) θ(n log n)
(c) θ(n2)
(d) θ(n(logn) 2)
Answer:
(a) θ(n)

Question 8.
The \(\Theta\) notation in asymptotic evaluation represents
(a) Base case
(b) Average case
(c) Worst case
(d) NULL case
Answer:
(b) Average case

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 9.
If a problem can be broken into subproblems which are reused several times, the problem possesses which property?
Answer:
(a) Overlapping subproblems
(b) Optimal substructure
(c) Memoization
(d) Greedy
Answer:
(a) Overlapping subproblems

Question 10.
In dynamic programming, the technique of storing the previously calculated values is called?
(a) Saving value property
(b) Storing value property
(c) Memoization
(d) Mapping
Answer:
(c) Memoization

PART – II
II. Answer The Following Questions

Question 1.
What is an Algorithm?
Answer:
An algorithm is a finite set of instructions to accomplish a particular task. It is a step-by-step procedure for solving a given problem. An algorithm can be implemented in any suitable programming language.

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 2.
Define Pseudo code?
Answer:

  1. Pseudo code is a mix of programming – language – like constructs and Plain English.
  2. Pseudo code is a notation similar to programming languages. Algorithms expressed in pseudo code are not intended to be executed by computers, but for communication among people.

Question 3.
Who is an Algorist?
Answer:

  1. A person skilled in the design of algorithms are called as Algorist.
  2. An algorithmic artist.

Question 4.
What is Sorting?
Answer:
Sorting is a method of arranging group of items in an ascending or descending order. Various sorting techniques in algorithms are Bubble Sort, Quick Sort, Heap Sort, Selection Sort, Insertion Sort.

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 5.
What is searching? Write its types?
Answer:
A search algorithm is the step-by-step procedure used to locate specific data among a collection of data. Types of searching algorithms are

  1. Linear search
  2. Binary search
  3. Hash search
  4. Binary Tree search

PART – III
III. Answer The Following Questions

Question 1.
List the characteristics of an algorithm?
Answer:
Input, Output, Finiteness, Definiteness, Effectiveness, Correctness, Simplicity, Unambiguous, Feasibility, Portable and Independent.

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 2.
Discuss about Algorithmic complexity and its types?
Answer:
The complexity of an algorithm f(n) gives the running time and/or the storage space required by the algorithm in terms of n as the size of input data.

Time Complexity:
The Time complexity of an algorithm is given by the number of steps taken by the algorithm to complete the process.

Space Complexity:
Space complexity of an algorithm is the amount of memory required to run to its completion.

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 3.
What are the factors that influence time and space complexity?
Answer:
Time Complexity:
The Time complexity of an algorithm is given by the number of steps taken by the algorithm to complete the process.

Space Complexity:
Space complexity of an algorithm is the amount of memory required to run to its completion. The space required by an algorithm is equal to the sum of the following two components:

A fixed part is defined as the total space required to store certain data and variables for an algorithm. For example, simple variables and constants used in an algorithm. A variable part is defined as the total space required by variables, which sizes depends on the problem and its iteration. For example: recursion used to calculate factorial of a given value n.

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 4.
Write a note on Asymptotic notation?
Answer:
Asymptotic Notations:
Asymptotic Notations are languages that uses meaningful statements about time and space complexity.

(I) Big O
Big O is often used to describe the worst – case of an algorithm.

(II) Big Ω
Big Omega is the reverse Big O, if Bi O is used to describe the upper bound (worst – case) of a asymptotic function, Big Omega is used to describe the lower bound (best-case).

(III) Big \(\Theta\)
When an algorithm has a complexity with lower bound = upper bound, say that an algorithm has a complexity O (n log n) and Ω (n log n), it’s actually has the complexity \(\Theta\) (n log n), which means the running time of that algorithm always falls in n log n in the best – case and worst – case.

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 5.
What do you understand by Dynamic programming?
Answer:
Dynamic programming is an algorithmic design method that can be used when the solution to a problem can be viewed as the result of a sequence of decisions. Dynamic programming approach is similar to divide and conquer. The given problem is divided into smaller and yet smaller possible sub – problems.

PART – IV
IV. Answer The Following Questions

Question 1.
Explain the characteristics of an algorithm?
Answer:

  1. Input – Zero or more quantities to be supplied.
  2. Output – At least one quantity is produced.
  3. Finiteness – Algorithms must terminate after finite number of steps.
  4. Definiteness – All operations should be well defined. For example operations involving division by zero or taking square root for negative number are unacceptable.
  5. Effectiveness – Every instruction must be carried out effectively.
  6. Correctness – The algorithms should be error free.
  7. Simplicity – Easy to implement.
  8. Unambiguous – Algorithm should be clear and unambiguous. Each of its steps and their inputs/outputs should be clear and must lead to only one meaning.
  9. Feasibility – Should be feasible with the available resources.
  10. Portable – An algorithm should be generic, independent of any programming language or an operating system able to handle all range of inputs.
  11. Independent – An algorithm should have step-by-step directions, which should be independent of any programming code.

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 2.
Discuss about Linear search algorithm.?
Answer:
Linear Search:
Linear search also called sequential search is a sequential method for finding a particular value in a list. This method checks the search element with each element in sequence until the desired element is found or the list is exhausted. In this searching algorithm, list need not be ordered.

Pseudo code:
(I) Traverse the array using for loop
(II) In every iteration, compare the target search key value with the current value of the list.

  1. If the values match, display the current index and value of the array
  2. If the values do not match, move on to the next array element.

(III) If no match is found, display the search element not found.
To search the number 25 in the array given below, linear search will go step by step in a sequential order starting from the first element in the given array if the search element is found that index is returned otherwise the search is continued till the last index of the array. In this example number 25 is found at index number 3.
Samacheer kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies
Example 1:
Input: values[ ] = {5, 34, 65, 12, 77, 35}
target = 77
Output: 4
Example 2:
Input: values[ ] = {101, 392, 1, 54, 32, 22, 90, 93}
target = 200
Output: -1 (not found)

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 3.
What is Binary search? Discuss with example?
Answer:
Binary Search:
Binary search also called half – interval search algorithm. It finds the position of a search element within a sorted array. The binary search algorithm can be done as divide-and-conquer search algorithm and executes in logarithmic time.

Pseudo code for Binary search:
(I) Start with the middle element:

  • If the search element is equal to the middle element of the array i.e., the middle value = number of elements in array/2, then return the index of the middle element.
  • If not, then compare the middle element with the search value,
  • If the search element is greater than the number in the middle index, then select the elements to the right side of the middle index, and go to Step-1.
  • If the search element is less than the number in the middle index, then select the elements to the left side f the middle index, and start with Step-1.

(II) When a match is found, display success message with the index of the element matched.
(III) If no match is found for all comparisons, then display unsuccessful message.

Binary Search Working principles:
List of elements in an array must be sorted first for Binary search. The following example describes the step by step operation of binary search. Consider the following array of elements, the array is being sorted so it enables to do the binary search algorithm. Let us assume that the search element is 60 and we need to search the location or index of search element 60 using binary search.
Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies
First, we find index of middle element of the array by using this formula:
mid = low + (high – low) / 2
Here it is, 0 + (9 – 0 ) / 2 = 4 (fractional part ignored). So, 4 is the mid value of the array.
Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies
Now compare the search element with the value stored at mid value location 4. The value stored at location or index 4 is 50, which is not match with search element. As the search value 60 is greater than 50.
Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies
Now we change our low to mid + 1 and find the new mid value again using the formula, low to mid – 1
mid = low + (high – low) / 2
Our new mid is 7 now. We compare the value stored at location 7 with our target value 31.
Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies
The value stored at location or index 7 is not a match with search element, rather it is more than what we are looking for. So, the search element must be in the lower part from the current mid value location
Samacheer kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies
The search element still not found. Hence, we calculated the mid again by using the formula.
high = mid – 1
mid = low + (high – low) / 2
Now the mid value is 5.
Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies
Now we compare the value stored at location 5 with our search element. We found that it is a match.
Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies
We can conclude that the search element 60 is found at location or index 5. For example if we take the search element as 95, For this value this binary search algorithm return unsuccessful result.

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 4.
Explain the Bubble sort algorithm with example?
Answer:
Bubble sort algorithm:
Bubble sort is a simple sorting algorithm. The algorithm starts at the beginning of the list of values stored in an array. It compares each pair of adjacent elements and swaps them if they are in the unsorted order. This comparison and passed to be continued until no swaps are needed, which indicates that the list of values stored in an array is sorted. The algorithm is a comparison sort, is named for the way smaller elements “bubble” to the top of the list.

Although the algorithm is simple, it is too slow and less efficient when compared to insertion sort and other sorting methods. Assume list is an array of n elements. The swap function swaps the values of the given array elements.

Pseudo code:

  1. Start with the fist element i.e., index = 0, compare the current element with the next element of the array.
  2. If the current element is greater than the next element of the array, swap them.
  3. If the current element is less than the next or right side of the element, move to the next element. Go to Step 1 and repeat until end of the index is reached.

Let’s consider an array with values {15, 11, 16, 12, 14, 13} Below, we have a pictorial representation of how bubble sort will sort the given array.
Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies
The above pictorial example is for iteration – 1. Similarly, remaining iteration can be done. The final iteration will give the sorted array.
At the end of all the iterations we will get the sorted values in an array as given below:
Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 5.
Explain the concept of Dynamic programming with suitable example?
Answer:
Dynamic programming:
Dynamic programming is an algorithmic design method that can be used when the solution to a problem can be viewed as the result of a sequence of decisions. Dynamic programming approach is similar to divide and conquer. The given problem is divided into smaller and yet smaller possible sub – problems.

Dynamic programming is used whenever problems can be divided into similar sub-problems, so that their results can be re-used to complete the process. Dynamic programming approaches are used to find the solution in optimized way. For every inner sub problem, dynamic algorithm will try to check the results of the previously solved sub-problems. The solutions of overlapped sub – problems are combined in order to get the better solution.

Steps to do Dynamic programming:

  1. The given problem will be divided into smaller overlapping sub-problems.
  2. An optimum solution for the given problem can be achieved by using result of smaller sub – problem.
  3. Dynamic algorithms uses Memoization.

Fibonacci Series – An example:
Fibonacci series generates the subsequent number by adding two previous numbers. Fibonacci series starts from two numbers – Fib 0 & Fib 1. The initial values of fib 0 & fib 1 can be taken as 0 and 1.
Fibonacci series satisfies he following conditions:
Fibn = Fibn-1 + Fibn-2
Hence, a Fibonacci series for the n value 8 can look like this
Fib8 = 0 1 1 2 3 5 8 13

Fibonacci Iterative Algorithm with Dynamic programming approach:
The following example shows a simple Dynamic programming approach for the generation of Fibonacci series.
Initialize f0 = 0, f1 = 1
step – 1: Print the initial values of Fibonacci f0 and f1
step – 2: Calculate fibanocci fib ← f0 + f1
step – 3: Assign f0 ← f1, f1 ← fib
step – 4: Print the next consecutive value of Fibonacci fib
step – 5: Go to step – 2 and repeat until the specified number of terms generated
For example if we generate fibonacci series up to 10 digits, the algorithm will generate the series as shown below:
The Fibonacci series is: 0 1 1 2 3 5 8 1 3 2 1 3 4 5 5

Samacheer kalvi 12th Computer Science Algorithmic Strategies Additional Questions and Answers

PART – I
I. Choose The Best Answer

Question 1.
Which one of the following is not a data structure?
(a) Array
(b) Structures
(c) List, tuples
(d) Database
Answer:
(d) Database

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 2.
The word Algorithm has come to refer to a method ……………………………
(a) Solve a problem
(b) Insert a data
(c) Delete data
(d) Update data
Answer:
(a) Solve a problem

Question 3.
Which is wrong fact about the algorithm?
(a) It should be feasible
(b) Easy to implement
(c) It should be independent of any programming languages
(d) It should be generic
Answer:
(c) It should be independent of any programming languages

Question 4.
Complete the diagram
Samacheer kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies
Answer:
Process

Question 5.
An algorithm that yields expected output for a valid input is called as ……………………………
Answer:
Algorithmic solution.

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 6.
Program should be written for the selected language with specific ……………………………
Answer:
Syntax

Question 7.
…………………………… is an expression of algorithm in a programming language.
Answer:
Program

Question 8.
How many different phases are there in the analysis of algorithms and performance evaluations?
(a) 1
(b) 2
(c) 3
(d) Many
Answer:
(b) 2

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 9.
Which one of the following is a theoretical performance analysis of an algorithm?
(a) A posteriori testing
(b) A priori estimates
(c) A preposition
(d) A post preori
Answer:
(b) A priori estimates

Question 10.
…………………………… is called performance measurement.
(a) A posteriori testing
(b) A priori estimates
(c) A preposition
(d) A post preori
Answer:
(a) A posteriori testing

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 11.
Time is measured by counting the number of key operations like comparisons in the sorting algorithm. This is called as ……………………………
(a) Space Factor
(b) Key Factor
(c) Priori Factor
(d) Time Factor
Answer:
(d) Time Factor

Question 12.
Which of the following statement is true?
(a) Space Factor is the maximum memory space required by an algorithm
(b) Space Factor is the minimum memory spaces required by an algorithm
Answer:
(a) Space Factor is the maximum memory space required by an algorithm

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 13.
In space complexity, the space required by an algorithm is equal to the sum of …………………………… part and …………………………… part.
Answer:
Fixed, Variable

Question 14.
…………………………… is an example for variable part of space complexity.
Answer:
Recursion

Question 15.
A …………………………… or …………………………… trade off is a way of solving in less time by using more storage space or by solving a given algorithm in very little space by spending more time.
Answer:
Space – timw, time – memory

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 16.
Which is true related to the efficiency of an algorithm?
(I) Less time, more storage space
(II) More time, very little space
(a) I is correct
(b) II is correct
(c) Both are correct
(d) Both are wrong
Answer:
(c) Both are correct

Question 17.
How many asymptotic notations are used to represent time complexity of an algorithms?
(a) 1
(b) 2
(c) 3
(d) 4
Answer:
(c) 3

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 18.
Which one of the following is not an Asymptotic notations?
(a) Big
(b) Big \(\Theta\)
(c) Big Ω
(d) Big ⊗
Answer:
(d) Big ⊗

Question 19.
………………………… is the reverse of Big O
(a) Big Ω
(b) Big \(\Theta\)
(c) Big C
(d) Big ⊗
Answer:
(a) Big Ω

Question 20.
………………………… describes the worst case of an algorithm.
(a) Big Q
(b) Big \(\Theta\)
(c) Big O
(d) Big C
Answer:
(c) Big O

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 21.
…………………….. describes the lower bound of an algorithm.
(a) Big Ω
(b) Big \(\Theta\)
(c) Big O
(d) Big ⊗
Answer:
(a) Big Ω

Question 22.
Which search technique is also called sequential search techniques?
(a) Binary
(b) Binary Tree
(c) Hash
(d) Linear
Answer:
(d) Linear

Question 23.
What value will be returned by the linear search technique if value is not found?
(a) 0
(b) 1
(c) -1
(d) +1
Answer:
(c) -1

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 24.
Which search algorithm is called as Half – Interval search algorithm?
(a) Binary
(b) Binary Tree
(c) Hash
(d) Linear
Answer:
(a) Binary

Question 25.
Which technique is followed by Binary Search algorithm?
(a) Subroutines
(b) Mapping
(c) Divide and conquer
(d) Namespaces
Answer:
(c) Divide and conquer

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 26.
In Binary Search, if the search element is …………………….. to the middle element of the array, then index of the middle element is returned.
(a) >
(b) <
(c) =
(d) < >
Answer:
(c) =

Question 27.
In Binary search, if the search element is greater than the number in the middle index, then select the elements to the side of the middle index.
(a) Right
(b) Left
(c) Middle
(d) Bottom
Answer:
(a) Right

Question 28.
Fill in the box [Formula for Binary Search]
mid = low + (high – low) / Samacheer kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies
Answer:
2

Question 29.
……………………… is a simple sorting algorithm.
(a) Binary
(b) Bubble
(c) Selection
(d) Insertion
Answer:
(b) Bubble

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 30.
Which one of the following is not a characteristics of Bubble Sort?
(a) Simple
(b) Too slow
(c) Too fast
(d) Less efficient
Answer:
(c) Too fast

Question 31.
In selection sort, there will be ……………………….. exchange for every pass through the list.
(a) 0
(b) 1
(c) 2
(d) 3
Answer:
(b) 1

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 32.
How many number of passes are used in the Insertion Sort to get the final sorted list?
(a) 0
(b) 1
(c) n
(d) n -1
Answer:
(d) n – 1

Question 33.
………………………….. approach is similar to divide and conquer.
Answer:
Dynamic programming

Question 34.
………………………… is an example for dynamic programming approach.
(a) Fibonacci
(b) Prime
(c) Factorial
(d) Odd or Even
Answer:
(a) Fibonacci

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 35.
Match the following.
(1) Linear search – (i) o(n2)
(2) Binary – (ii) o(n)
(3) Bubble Sort – (iii) o(log n)
(4) Merge Sort – (iv) o(n log n)
(a) 1 – (ii), 2 – (iii), 3 – (i), 4 – (iv)
(b) 1 – (i), 2 – (ii), 3 – (iii), 4 – (iv)
(c) 1 – (iv), 2 – (iii), 3 – (ii), 4 – (i)
(d) 1 – (iv), 2 – (ii), 3 – (i), 4 – (iii)
Answer:
(a) 1 – (ii), 2 – (iii), 3 – (i), 4 – (iv)

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 36.
Time complexity of bubble sort in worst case is …………………………..
(a) θ(n)
(b) θ(n log n)
(c) θ(n2)
(d) θ(n(log n)2)
Answer:
(c) θ(n2)

Question 37.
The complexity of Merge Sort is …………………………
Answer:
o (n log n)

Question 38.
The complexity of Bubble Sort is …………………………
Answer:
o (n2)

Question 39.
The complexity of Binary search is ……………………….
Answer:
o (log n)

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 40.
Pick the odd one out.
Merge Sort, Bubble, Binary, Insertion.
Answer:
Binary

PART – II
II. Answer The Following Questions

Question 1.
Define fixed part in the space complexity?
Answer:
A fixed part is defined as the total space required to store certain data and variables for an algorithm. For example, simple variables and constants used in an algorithm.

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 2.
What is space – Time Trade off?
Answer:
A space – time or time – memory trade off is a way of solving in less time by using more storage space or by solving a given algorithm in very little space by spending more time.

PART – III
III. Answer The Following Questions

Question 1.
Design an algorithm to find square of the given number and display the result?
Answer:
Problem: Design an algorithm to find square of the given number and display the result. The algorithm can be written as:
Step 1 – start the process
Step 2 – get the input x
Step 3 – calculate the square by multiplying the input value ie., square ← x* x
Step 4 – display the result square
Step 5 – stop
Algorithm could be designed to get a solution of a given problem. A problem can be solved in many ways. Among many algorithms the optimistic one can be taken for implementation.

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 2.
Differentiate Algorithm and Program?
Answer:
Algorithm:

  1. Algorithm helps to solve a given problem logically and it can be contrasted with the program.
  2. Algorithm can be categorized based on their implementation methods, design techniques etc.
  3. There is no specific rules for algorithm writing but some guidelines should be followed.
  4. Algorithm resembles a pseudo code which can be implemented in any language

Program:

  1. Program is an expression of algorithm in a programming language.
  2. Algorithm can be implemented by structured or object oriented programming approach.
  3. Program should be written for the selected language with specific syntax
  4. Program is more specific o a programming language

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 3.
What are the two phases in the Analysis of algorithms and performance evaluation?
Answer:
Analysis of algorithms and performance evaluation can be divided into two different phases:
(a) A Priori estimates: This is a theoretical performance analysis of an algorithm. Efficiency of an algorithm is measured by assuming the external factors.
(b) A Posteriori testing: This is called performance measurement. In this analysis, actual statistics like running time and required for the algorithm executions are collected.

Question 4.
Name the factors where the program execution time depends on?
The program execution time depends on:

  1. Speed of the machine
  2. Compiler and other system Software tools
  3. Operating System
  4. Programming language used
  5. Volume of data required

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 5.
Write note on Big \(\Theta\)?
Answer:
Big \(\Theta\)
When an algorithm has a complexity with lower bound = upper bound, say that an algorithm has a complexity O (n log n) and Ω . (n log n), it’s actually has the complexity \(\Theta\) (n log n), which means the running time of that algorithm always falls in n log n in the best – case and worst – case.

PART – IV
IV. Answer The Following Questions

Question 1.
Explain Selection Sort?
Answer:
Selection sort
The selection sort is a simple sorting algorithm that improves on the performance of bubble sort by making only one exchange for every pass through the list. This algorithm will first find the smallest elements in array and swap it with the element in the first position of an array, then it will find the second smallest element and swap that element with the element in the second position, and it will continue until the entire array is sorted in respective order. This algorithm repeatedly selects the next-smallest element and swaps in into the right place for every pass. Hence it is called selection sort.

Pseudo code:
(I) Start from the first element (i.e.), index – 0, we search the smallest element in the array, and replace it with the element in the first position.

(II) Now we move on to the second element position, and look for smallest element present in the sub-array, from starting index to till the last index of sub – array.

(III) Now replace the second smallest identified in step-2 at the second position in the or original array, or also called first position in the sub array.

(IV) This is repeated, until the array is completely sorted.
Let’s consider an array with values {13, 16, 11, 18, 14, 15}
Below, we have a pictorial representation of how selection sort will sort the given array
Samacheer kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies
In the first pass, the smallest element will be 11, so it will be placed at the first position. After that, next smallest element will be searched from an array. Now we will get 13 as the smallest, so it will be then placed at the second position.

Then leaving the first element, next smallest element will be searched, from the remaining elements. We will get 13 as the smallest, so it will be then placed at the second position. Then leaving 11 and 13 because they are at the correct position, we will search for the next smallest element from the rest of the elements and put it at third position and keep doing this until array is sorted.
Finally we will get the sorted array end of the pass as shown above diagram.

Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Question 2.
Explain Insertion Sort?
Answer:
Insertion Sort
Insertion sort is a simple sorting algorithm. It works by taking elements from the list one by one and inserting then in their correct position in to a new sorted list. This algorithm builds the final sorted array at the end. This algorithm uses n-1 number of passes to get the final sorted list as per the previous algorithm as we have discussed.
Pseudo for Insertion sort
Step 1 – If it is the first element, it is already sorted.
Step 2 – Pick next element
Step 3 – Compare with all elements in the sorted sub-list
Step 4 – Shift all the elements in the sorted sub-list that is greater than the value to be sorted
Step 5 – Insert the value
Step 6 – Repeat until list is sorted
Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies
At the end of the pass the insertion sort algorithm gives the sorted output in ascending order as shown below:
Samacheer Kalvi 12th Computer Science Solutions Chapter 4 Algorithmic Strategies

Samacheer Kalvi 11th Computer Applications Solutions Chapter 13 CSS – Cascading Style Sheets

Students can Download Computer Applications Chapter 13 CSS – Cascading Style Sheets Questions and Answers, Notes Pdf, Samacheer Kalvi 11th Computer Applications Book Solutions Guide Pdf helps you to revise the complete Tamilnadu State Board New Syllabus and score more marks in your examinations.

Tamilnadu Samacheer Kalvi 11th Computer Applications Solutions Chapter 13 CSS – Cascading Style Sheets

Samacheer Kalvi 11th Computer Applications CSS – Cascading Style Sheets Text Book Back Questions and Answers

I. Choose The Correct Answer

Question 1.
Expansion of CSS:
(a) Cascading Style Schools
(b) Cascading Style Scheme
(c) Cascading Style Sheets
(d) Cascading Style Shares
Answer:
(c) Cascading Style Sheets

Samacheer Kalvi 11th Computer Applications Solutions Chapter 13 CSS - Cascading Style Sheets

Question 2.
Which of the following is the page level style?
(a) <Page>
(b) <Style>
(c) <Link>
(d) <H>
Answer:
(b) <Style>

Question 3.
CSS is also called as:
(a) Sitewide Style Sheets
(b) Internal Style Sheets
(c) Inline Style Sheets
(d) Internal Inline Sheets
Answer:
(a) Sitewide Style Sheets

Samacheer Kalvi 11th Computer Applications Solutions Chapter 13 CSS - Cascading Style Sheets

Question 4.
The extension of CSS file is:
(a) .ssc
(b) .css
(c) .CSC
(d) .htm
Answer:
(b) .css

Question 5.
What is selector?
(a) Property
(b) Value
(c) HTML tag
(d) Name
Answer:
(c) HTML tag

Samacheer Kalvi 11th Computer Applications Solutions Chapter 13 CSS - Cascading Style Sheets

Question 6.
The Declaration block of CSS is surrounded by:
(a) ( )
(b) [ ]
(c) { }
(d) <>
Answer:
(c) { }

Question 7.
The declaration should be terminated by:
(a) :
(b) ;
(c) .
(d) ,
Answer:
(b) ;

Question 8.
What is the property to set text as bold?
(a) Font-Style
(b) Font-Weight
(c) Font-Property
(d) Font-Bold
Answer:
(b) Font-Weight

Samacheer Kalvi 11th Computer Applications Solutions Chapter 13 CSS - Cascading Style Sheets

Question 9.
Which of the following indicates that the text included is a comment?
(a) /**/
(b) !* *!
(c) <* *>
(d) \* *\
Answer:
(a) /**/

Samacheer Kalvi 11th Computer Applications Solutions Chapter 13 CSS - Cascading Style Sheets

Question 10.
Which of the following ways below is correct, to write a CSS?
(a) p{coloured; text-align:center};
(b) p {colonred; text-align:center}
(c) p {color:red; text-align:center;}
(d) p (color:red;text-align:center;)
Answer:
(c) p {color:red; text-align:center;}

II. Answer To The Following Questions

Question 1.
What is the use of <style> tag?
Answer:
We are already know about the formatting tags and its attributes, in some situations, you may need to use a tag uniformly in the entire document. To do so, we can use <style> tag. A style tag is used to change the default characteristics of a particular tag in the entire web document wherever that tag is used.

Samacheer Kalvi 11th Computer Applications Solutions Chapter 13 CSS - Cascading Style Sheets

Question 2.
What is CSS?
Answer:
Cascading Style Sheets (CSS) are also called as Sitewide Style sheets or external style. CSS is a style sheet language used for describing the formatting of a document written in HTML. Using CSS, you can control the font colour, font style, spacing between pages, columns size, border colour, background image or colour and various other effects in a web page.

Question 3.
Write the general format of linking CSS with HTML?
Answer:
The <link> tag is used to add CSS file with HTML in head section. While using <link> tag, the following attributes are also included along with standard values.
rel = “stylesheet”
type = “text/css”
The href attribute is used to link the .css file. General format of <Link> tag:
<Link rel = “stylesheet” type = “text/css” href = CSS_ File_Name_with_Extension>

Samacheer Kalvi 11th Computer Applications Solutions Chapter 13 CSS - Cascading Style Sheets

Question 4.
What is Inline Style?
Answer:
“Inline style”, which is used to define style for a particular tag anywhere in an HTML document. You can define styles for any tag within an HTML document. But it is applicable only on that line where it is defined. If you use the same tag, again in the same documnet, it does not reflect the new style.

Samacheer Kalvi 11th Computer Applications Solutions Chapter 13 CSS - Cascading Style Sheets

Question 5.
Write down general format of CSS declaration?
Answer:
The body of the style sheet consists of a series of rules.

Selector:
HTML Tag

Declaration:
{Properties: Values}

III. Answer To The Following Questions

Question 1.
What are the advantages of using CSS?
Answer:
Maintainability:
CSS are also defined and stored as separate files. So, the style and appearance of a web page can be dynamically changed and maintain with less effort.

Reusability:
The styles defined in CSS can be reused in multiple HTML pages.

Easy to understand:
The tags in web pages are well organized with style specifications and therefore it is easy to understand.

Samacheer Kalvi 11th Computer Applications Solutions Chapter 13 CSS - Cascading Style Sheets

Question 2.
Write a short note on rule of CSS?
Answer:
CSS style declaration consists of two major parts; Selector and Declaration. The Selector refers an HTML tag in which you want to apply styles.

The Declaration is a block of code contains style definition. It should be surrounded by curly braces. You can include any number of properties for each selector, and they must be separated by semicolons, The property name and its value should be separated by a colon. Each declaration should be terminated by a semicolon (;).
Eg:
Samacheer Kalvi 11th Computer Applications Solutions Chapter 13 CSS - Cascading Style Sheets

Question 3.
Wrie a CSS file to define text color and alignment to <p> tag?
Answer:
The style properties are defined to <p> tag. Hereafter, whenever you use the <p>, the contents will be displayed with modified properties.

If you want to use the above style definition as an internal style then it should be specified within <style>,</style> block in head section. If you want store the above definition for using all your web pages, you should save the above code as a separate file with extension.css

Samacheer Kalvi 11th Computer Applications Solutions Chapter 13 CSS - Cascading Style Sheets

Question 4.
Write a CSS file to define font type, style and size to <h1> tag?
Answer:
<h1> tag in a particular font style and size with blue colour in the entire page,You can use <style> tag to define its properties in head section. The style of <h1> header tag is clearly defined. So, hereafter, the content between <h1> and </h1> will be displayed as per its definition.

IV. Answer To The Following Questions

Question 1.
Write an HTML document to display the following oaragraph as per the given description Using CSS:
Font Name:
Cooper Black

Style:
Bold Italics

Color:
Blue “The State Institute of Education (SIE) was established in 1965 to provide for systematic study of problems relating to School Education under the administration of Directorate of School Education.”

Samacheer Kalvi 11th Computer Applications Solutions Chapter 13 CSS - Cascading Style Sheets

Question 2.
List and explain the Font and text element properties and values used CSS?
Answer:
Samacheer Kalvi 11th Computer Applications Solutions Chapter 13 CSS - Cascading Style Sheets

Samacheer Kalvi 11th Computer Applications HTML – Adding Multimedia Elements and Forms Additional Questions and Answers

I. Choose The Correct Answer

Question 1.
Which tag is used to change the default characteristics of web document?
(a) Style
(b) Font
(c) Text
(d) Colour
Answer:
(a) Style

Samacheer Kalvi 11th Computer Applications Solutions Chapter 13 CSS - Cascading Style Sheets

Question 2.
Which is used to define style for a particular tag anywhere in a HTML document?
(a) Internal style
(b) Inline style
(c) External style
(d) Page style
Answer:
(b) Inline style

Question 3.
CSS was invented by:
(a) Hakon Wium Lie
(b) Hakon Willium Lee
(c) Hakon Street Man
(d) Hakon Lee
Answer:
(a) Hakon Wium Lie

Question 4.
The <style> tag are also called as:
(a) page-level styles
(b) inline styles
(c) external styles
(d) both (a) & (c)
Answer:
(a) page-level styles

Samacheer Kalvi 11th Computer Applications Solutions Chapter 13 CSS - Cascading Style Sheets

Question 5.
Which section is used by the <link> tag to add CSS file?
(a) Body
(b) Head
(c) Style
(d) Title
Answer:
(b) Head

Samacheer Kalvi 11th Computer Applications Solutions Chapter 13 CSS - Cascading Style Sheets

Question 6.
Expand XHTML:
(a) Extensible Hypertext Markup Language
(b) Extended Hypertext Markup Language
(c) Executed Hypertext Markup Language
(d) Except Hypertext Markup Language
Answer:
(a) Extensible Hypertext Markup Language

II. Answer The Following Questions

Question 1.
What is called page-level sheets or internal sheets?
Answer:
The <style> tag controls the presentation styles of a particular HTML document. If you want to use a particular tag with the same style applied in one HTML document to another is not possible. Thus, the <style> tags are called as “Page-Level Styles” or “Internal Style sheets”.

Samacheer Kalvi 11th Computer Applications Solutions Chapter 13 CSS - Cascading Style Sheets

Question 2.
What is known as sitewide style sheets or external style sheets?
Answer:
The “Internal Style Sheet” is defined and implemented only within an HTML document. If you want use the same style to multiple pages, you should define styles as a separate style file. These separate style files are known as “Sitewide Style Sheets” or ‘”External Style Sheets”.

III. Answer The Following Questions

Question 1.
Write the suitable example for creating CSS style?
Answer:
P {
font-style : Italic;
color :MediumSeaGreen;
}
H1
{
border: 2px solid red;
}
The above code should be saved with extension. css

Samacheer Kalvi 11th Computer Applications Solutions Chapter 13 CSS - Cascading Style Sheets

Question 2.
Write the properties and values of paragraph margin in CSS?
Answer:
Samacheer Kalvi 11th Computer Applications Solutions Chapter 13 CSS - Cascading Style Sheets

IV. Answer The Following Questions

Question 1.
Write the html code to change the background colour of browser using CSS?
Answer:
– Back_Color.css —
body
{
background-color : pink;
}
Background_CSS.htm
<html>
<head>
<title> Changing Background using CSS </title>
<link rel = “stylesheet” type=”text/css” href=”Body_Color.css”> </head>
<body>
<H1> Welcome to CSS
</H1>
</body>
</html>

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Students can Download Computer Science Chapter 7 Python Functions Questions and Answers, Notes Pdf, Samacheer Kalvi 12th Computer Science Book Solutions Guide Pdf helps you to revise the complete Tamilnadu State Board New Syllabus and score more marks in your examinations.

Tamilnadu Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Samacheer Kalvi 12th Computer Science Python Functions Text Book Back Questions and Answers

PART – I
I. Choose The Best Answer

Question 1.
A named blocks of code that are designed to do one specific job is called as …………………………
(a) Loop
(b) Branching
(c) Function
(d) Block
Answer:
(c) Function

Question 2.
A Function which calls itself is called as …………………………
(a) Built – in
(b) Recursion
(c) Lambda
(d) Return
Answer:
(b) Recursion

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 3.
Which function is called anonymous un – named function?
(a) Lambda
(b) Recursion
(c) Function
(d) Define
Answer:
(a) Lambda

Question 4.
Which of the following keyword is used to begin the function block?
(a) Define
(b) For
(c) Finally
(d) Def
Answer:
(d) Def

Question 5.
Which of the following keyword is used to exit a function block?
(a) Define
(b) Return
(c) Finally
(d) Def
Answer:
(b) Return

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 6.
While defining a function which of the following symbol is used.
(a) ; (semicolon)
(b) . (dot)
(c) : (colon)
(d) $ (dollar)
Answer:
(c) : (colon)

Question 7.
In which arguments the correct positional order is passed to a function?
(a) Required
(b) Keyword
(c) Default
(d) Variable – length
Answer:
(a) Required

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 8.
Read the following statement and choose the correct statement(s).
(I) In Python, you don’t have to mention the specific data types while defining function.
(II) Python keywords can be used as function name.

(a) (I) is correct and (II) is wrong
(b) Both are correct
(c) (I) is wrong and (II) is correct
(d) Both are wrong
Answer:
(a) (I) is correct and (II) is wrong

Question 9.
Pick the correct one to execute the given statement successfully.
if_: print (x,” is a leap year”)
(a) x % 2 = 0
(b) x % 4 = = 0
(c) x / 4 = 0
(d) x % 4 = 0
Answer:
(b) x % 4 = = 0

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 10.
Which of the following keyword is used to define the function testpython():?
(a) Define
(b) Pass
(c) Def
(d) While
Answer:
(c) Def

PART – II
II. Answer The Following Questions

Question 1.
What is function?
Answer:
Functions are named blocks of code that are designed to do specific job. If you need to perform that task multiple times throughout your program, you just call the function dedicated to handling that task.

Question 2.
Write the different types of function?
Answer:

  1. User – defined Functions
  2. Built – in Functions
  3. Lambda Functions
  4. Recursion Functions

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 3.
What are the main advantages of function?
Answer:
Main advantages of functions are:

  1. It avoids repetition and makes high degree of code reusing.
  2. It provides better modularity for your application.

Question 4.
What is meant by scope of variable? Mention its types?
Answer:
Scope of variable refers to the part of the program, where it is accessible, i.e., area where you can refer (use) it. We can say that scope holds the current set of variables and their values. The two types of scopes are: local scope and global scope.

Question 5.
Define global scope?
Answer:
A variable, with global scope can be used anywhere in the program. It can be created by defining a variable outside the scope of any function/block.

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 6.
What is base condition in recursive function?
Answer:
The condition that is applied in any recursive function is known as base condition. A base condition is must in every recursive function otherwise it will continue to execute like an infinite loop.

Question 7.
How to set the limit for recursive function? Give an example?
Answer:
Python also allows you to change the limit using sys.setrecursionlimit (limit value).
Example:
import sys
sys.setrecursionlimit(3000)
def fact (n):
if n = = 0:
return 1
else:
return n * fact (n – 1)
print (fact (2000))

PART – III
III. Answer The Following Questions

Question 1.
Write the rules of local variable?
Answer:
Rules of local variable:

  1. A variable with local scope can be accessed only within the function/block that it is created in.
  2. When a variable is created inside the function/block, the variable becomes local to it.
  3. A local variable only exists while the function is executing.
  4. The formate arguments are also local to function.

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 2.
Write the basic rules for global keyword in python?
Answer:
The basic rules for global keyword in Python are:

  1. When we define a variable outside a function, it’s global by default. You don’t have to use global keyword.
  2. We use global keyword to read and write a global variable inside a function.
  3. Use of global keyword outside a function has no effect

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 3.
What happens when we modify global variable inside the function?
Answer:
It will change the global variable value outside the function also.

Question 4.
Differentiate ceil ( ) and floor ( ) function?
Answer:
Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 5.
Write a Python code to check whether a given year is leap year or not?
Leap year or not:
Program code:
Answer:
n = int (input(“Enter any year”))
if (n % 4 = = 0):
print “Leap year”
else:
print “Not a Leap year”
Output:
Enter any year 2001
Not a Leap year

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 6.
What is composition in functions?
Answer:
The value returned by a function may be used as an argument for another function in a nested manner. This is called composition. For example, if we wish to take a numeric value or an expression as a input from the user, we take the input string from the user using the function input ( ) and apply eval ( ) function to evaluate its value.

Question 7.
How recursive function works?
Answer:

  1. Recursive function is called by some external code.
  2. If the base condition is met then the program gives meaningful output and exits.
  3. Otherwise, function does some required processing and then calls itself to continue recursion.

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 8.
What are the points to be noted while defining a function?
Answer:

  1. Function blocks begin with the keyword “def ” followed by function name and parenthesis ( ).
  2. Any input parameters or arguments should be placed within these parentheses when you define a function.
  3. The code block always comes after a colon (:) and is indented.
  4. The statement “return [expression]” exits a function, optionally passing back an expression to the caller. A “return” with no arguments is the same as return None

PART – IV
IV. Answer The Following Questions

Question 1.
Explain the different types of function with an example?
Answer:
Types of Functions:
Basically, we can divide functions into the following types:

  1. User – defined Functions
  2. Built – in Functions
  3. Lambda Functions
  4. Recursion Functions

Functions:
User – defined functions
Built – in functions
Lambda functions
Recursion functions

Description:
Functions defined by the users themselves.
Functions that are inbuilt with in Python.
Functions that are anonymous un-named function.
Functions that calls itself is known as recursive.

(I) Syntax for User defined function
def <function_name ( [parameter1, parameter!…] ) > :
<Block of Statements> return <expression /None>
Example:
def hello ( ):
print (“hello – Python”)
return

Advantages of User – defined Functions:

  1. Functions help us to divide a program into modules. This makes the code easier to manage.
  2. It implements code reuse. Every time you need to execute a sequence of statements, all you need to do is to call the function.
  3. Functions, allows us to change functionality easily, and different programmers can work on different functions.

(II) Anonymous Functions:
In Python, anonymous function is a function that is defined without a name. While normal functions are defined using the def keyword, in Python anonymous functions are defined using the lambda keyword. Hence, anonymous functions are also called as lambda functions.

The use of lambda or anonymous function:

  1. Lambda function is mostly used for creating small and one-time anonymous function.
  2. Lambda functions are mainly used in combination with the functions like filter ( ), map ( ) and reduce ( ).

Syntax of Anonymous Functions
The syntax for anonymous functions is as follows:
lambda [argument(s)] expression
Example:
sum = lambda argl, arg2: argl + arg2
print (‘The Sum is sum (30, 40))
print (‘The Sum is :’, sum (-30, 40))
Output:
The Sum is: 70
The Sum is: 10
The above lambda function that adds argument argl with argument arg2 and stores the result in the variable sum. The result is displayed using the print ( ).

(III) Functions using libraries:
Built – in and Mathematical functions
Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

(IV) Recursive functions:
When a function calls itself is known as recursion. Recursion works like loop but sometimes 1 ’ it makes more sense to use recursion than loop. You can convert any loop to recursion.
Example:
def fact(n):
if n = = 0:
return 1
else:
return n * fact (n – 1)
print (fact (0))
print (fact (5))
Output:
1
120

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 2.
Explain the scope of variables with an example?
Answer:
Scope of Variables:
Scope of variable refers to the part of the program, where it is accessible, i.e., area where you can refer (use) it. We can say that scope holds the current set of variables and their values.
The two types of scopes are local scope and global scope.

(I) Local scope:
A variable declared inside the function’s body or in the local scope is called as local variable.

Rules of local variable:

  1. A variable with local scope can be accessed only within the function/block that it is created in.
  2. When a variable is created inside the function/block; the variable becomes local to it.
  3. A local variable only exists while the function is executing.
  4. The formate arguments are also local to function.

Example: Create a Local Variable
def loc ( ):
y = 0 # local scope
print (y)
loc ( )
Output:
0
(II) Global Scope:
A variable, with global scope can be used anywhere in the program. It can be created by defining a variable outside the scope of any function/block.

Rules of global Keyword:
The basic rules for global keyword in Python are:

  1. When we define a variable outside a function, it’s global by default. You don’t have to useglobal keyword.
  2. We use global keyword to read and write a global variable inside a function.
  3. Use of global keyword outside a function has no effect

Example: Global variable and Local variable with same name
x = 5 def loc ( ):
x = 10
print (“local x:”, x)
loc ( )
print (“global x:”, x)
Output:
local x: 10
global x: 5
In above code, we used same name ‘x’ for both global variable and local variable. We get different result when we print same variable because the variable is declared in both scopes, i.e. the local scope inside the function loc() and global scope outside the function loc ( ).
The output:- local x: 10, is called local scope of variable.
The output: – global x: 5, is called global scope of variable.

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 3.
Explain the following built-in functions?
(a) id ( )
(b) chr ( )
(c) round ( )
(d) type ( )
(e) pow ( )
Answer:
Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions
Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions
Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 4.
Write a Python code to find the L.C.M. of two numbers?
Answer:
Method I using functions:
def lcm (x, y):
if x > y:
greater = x
else:
greater = y while (true):
if ((greater % x = = 0) and (greater % y = = 0)):
lcm = greater break
greater + = 1
return lcm
num 1 = int (input(“Enter first number : “))
num 2 = int (input(“Enter second number : “))
print (“The L.C.M of”, numl, “and”, num, “is”, lcm(num1, num2))

Method II
(without using functions)
a = int (input (“Enter the first number :”))
b = int (input (“Enter the second number :”))
if a > b:
mini = a
else:
min 1 = b
while(1):
if (min 1 % a = = 0 and mini 1 % b = = 0):
print (“LCM is:”, mini)
break
mini = min 1 + 1
Output:
Enter the first number: 15
Enter the second number: 20
LCM is: 60

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 5.
Explain recursive function with an example?
Answer:
Python recursive functions
When a function calls itself is known as recursion. Recursion works like loop but sometimes it makes more sense to use recursion than loop. You can convert any loop to recursion.
A recursive function calls itself. Imagine a process would iterate indefinitely if not stopped by some condition! Such a process is known as infinite iteration. The condition that is applied in any recursive function is known as base condition. A base condition is must in every recursive function otherwise it will continue to execute like an infinite loop.

Working Principle:

  1. Recursive function is called by some external code.
  2. If the base condition is met then the program gives meaningful output and exits.
  3. Otherwise, function does some required processing and then calls itself to continue recursion. Here is an example of recursive function used to calculate factorial.

Example:
def fact (n):
if n = = 0:
return 1
else:
return n * fact (n – 1)
print (fact (0))
print (fact (5))
Output:
1
120

Practice Programs

Question 1.
Try the following code in the above program?
Answer:
Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions
Output:
1. Error

2. Name: Sri
Salary: 3500
Salary: 3500

3. Name: Balu
Salary: 3500

4. Name: Jose
Salary: 1234

5. Name:
Salary: 1234

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 2.
Evaluate the following functions and write the output?
Answer:
Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions
Output:

  1. 30
  2. 9
  3. 8
  4. 9

Question 3.
Evaluate the following functions and write the output?
Answer:
Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions
Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions
Output:
(i) 1. 13
2. 3.2

(ii) 1. 50
2. 36

(iii) <class ‘str’>

(iv) 0b10000

(v). 1. CR (carriage return)
2. It moves the cursor to the beginning of same line

(vi) 1. 8.2
2. 18.0
3. 0.510
4. 0.512

(vii) 1. B
2. a
3. A
4. 6
5. 10

(viii) 1. 0.125
2. 8.0
3. 1

Samacheer kalvi 12th Computer Science Python Functions Additional Questions and Answers

PART – 1
I. Choose The Best Answer

Question 1.
Name of the function is followed by ………………………….
(a) ( )
(b) [ ]
(c) <>
(d) { }
Answer:
(a) ( )

Question 2.
A …………………………. is one or more lines of code, grouped together.
(a) Code –
(b) Block
(c) Function
(d) Arguments
Answer:
(b) Block

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 3.
A block of code begins when a line is indented by ……………………. spaces usually.
(a) 2
(b) 3
(c) 4
(d) 5
Answer:
(c) 4

Question 4.
A block within a block is called …………………………… block.
Answer:
Nested

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 5.
If the return has no argument, …………………………….. will be displayed as the last statement of the output.
(a) No
(b) None
(c) Nothing
(d) No value
Answer:
(b) None

Question 6.
How many types of functions arguments are there?
(a) 2
(b) 3
(c) 4
(d) 5
Answer:
(c) 4

Question 7.
The arguments can be given in improper order in ………………………. arguments.
(a) Required
(b) Keyword
(c) Default
(d) Variable – length
Answer:
(b) Keyword

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 8.
What is the symbol used to denote variable – length arguments?
(a) +
(b) *
(c) &
(d) ++
Answer:
(b) *

Question 9.
How many methods of arguments passing are there in variable length method.
(a) 2
(b) 3
(c) 4
(d) 5
Answer:
(a) 2

Question 10.
Non – keyword variable arguments are called ……………………………….
Answer:
Tuples

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 11.
In python’s ……………………….. function supports variable length arguments.
(a) Input
(b) Write
(c) Output
(d) Print
Answer:
(d) Print

Question 12.
Lambda functions cannot be used in combination with ………………………….
(a) Filter
(b) Map
(c) Print
(d) Reduce
Answer:
(c) Print

Question 13.
Lambda function can only access ……………………….. variables.
(a) Local
(b) Function
(c) Global
(d) Nested
Answer:
(c) Global

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 14.
How many types of scopes are there?
(a) 2
(b) 3
(c) 4
(d) 5
Answer:
(a) 2

Question 15.
Find the correct one:
(a) Global keyword outside the function has no effect
(b) Global keyword outside the function has effect
Answer:
(a) Global keyword outside the function has no effect

Question 16.
Read the following statement and choose the wrong statements
(a) Without using the global keyword, we cannot modify the global variable
(b) Using global keyword we can modify the global variable
(c) Without global keyword, we can modify the global variable
Answer:
(c) Without global keyword, we can modify the global variable

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 17.
Find the correct statement.
(a) Local and global variables cannot be used in the same code
(b) Local and global variables can be used in the same code
Answer:
(b) Local and global variables can be used in the same code

Question 18.
The ……………………… function is the inverse of chr ( ) function.
(a) Ord ( )
(b) Abs ( )
(c) Chr ( )
(d) Bin ( )
Answer:
(a) Ord ( )

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 19.
…………………………. function is the alternative for bin ( ) function.
(a) Ord ( )
(b) Format ( )
(c) Binary ( )
(d) Ord ( )
Answer:
(b) Format ( )

Question 20.
bin ( ) returns the binary string prefixed with ………………………… for the given integer number
(a) b
(b) ob
(c) obin
(d) bin
Answer:
(b) ob

Question 21.
Find the output.
d = 43
print(‘A =ord(d))
(a) 67
(b) 95
(c) 97
(d) 65
Answer:
(d) 65

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 22.
Find the output,
d = 43
print (chr(d))
(a) –
(b) +
(c) *
(d) /
Answer:
(b) +

Question 23.
The default precision for fixed point number is ………………………….
(a) 2
(b) 4
(c) 6
(d) 8
Answer:
(c) 6

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 24.
How many formats are there for the format ( ) functions?
(a) 12
(b) 5
(c) 3
(d) 1
Answer:
(c) 3

Question 25.
………………………. function returns the smallest integer greater than or equal to x
(a) Sqrt
(b) Flow
(c) Floor
(d) Cell
Answer:
(d) Cell

Question 26.
………………………. function is used to evaluate the input value.
(a) Input
(b) Valuate
(c) Eval
(d) Val
Answer:
(c) Eval

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 27.
Any Loop can be converted to recursive functions.
True / False
Answer:
True

Question 28.
Find true statement
(a) Recursive function call itself
(b) Recursive function have to be called externally
Answer:
(a) Recursive function call itself

PART – II
II. Answer The Following Questions.

Question 1.
Define nested blocks?
Answer:
Nested Block:
A block within a block is called nested block. When the first block statement is indented by a single tab space, the second block of statement is indented by double tab spaces.

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 2.
Give the syntax for passing parameters in functions?
Answer:
Parameters or arguments can be passed to functions
def function _ name (parameter (s) separated by comma):

Question 3.
Differentiate parameters and arguments?
Answer:
Parameters are the variables used in the function definition whereas arguments are the values we pass to the function parameters.

Question 4.
Classify Function Arguments?
Function Arguments:

  1. Required arguments
  2. Keyword arguments
  3. Default arguments
  4. Variable – length arguments

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 5.
Define default arguments?
Answer:
Default Arguments
In Python the default argument is an argument that takes a default value if no value is provided in the function call. The following example uses default arguments, that prints default salary when no argument is passed, def printinfo(sal=3500):

Question 6.
What are the two methods of passing arguments in variable length arguments?
Answer:
In Variable Length arguments we can pass the arguments using two methods.

  1. Non keyword variable arguments
  2. Keyword variable arguments

PART – III
III. Answer The Following Questions.

Question 1.
Write the output for the program given below?
Answer:
Program:
def printdata (name, age):
print (“Example – 3 Keyword arguments”)
print (“Name :”,name)
print (“Age age)
return
# Now you can call printdata ( ) function
printdata (age = 25, name = “Gshan”)
Output:
Example – 3 Keyword arguments
Name: Gshan
Age: 25

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 2.
Give the syntax for defining variable – length arguments.?
Syntax – Variable – Length Arguments:
Answer:
def function _name (*args):
function_body
return_statement

Question 3.
Write note on return statement?
Answer:
The return Statement
1. The return statement causes your function to exit and returns a value to its caller. The point of functions in general is to take inputs and return something.

2. The return statement is used when a function is ready to return a value to its caller. So, only one return statement is executed at run time even though the function contains multiple return statements.

3. Any number of ‘return’ statements are allowed in a function definition but only one of them is executed at run time.

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 4.
Find the output?
Answer:
Program:
Answer:
x = 0 # global variable
def add ( ):
global x
x = x + 5 # increment by 2
print (“Inside add ( ) function x value is:”, x)
add ( )
print (“In main x value is x)
Output:
Inside add ( ) function x value is: 5.
In main x value is: 5

Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Question 5.
Write note on format function?
Answer:
Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

PART – IV
IV. Answer The Following Questions.

Question 1.
Write any 5 built in functions?
Answer:
Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions
Samacheer Kalvi 12th Computer Science Solutions Chapter 7 Python Functions

Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scoping

Students can Download Computer Science Chapter 3 Scoping Questions and Answers, Notes Pdf, Samacheer Kalvi 12th Computer Science Book Solutions Guide Pdf helps you to revise the complete Tamilnadu State Board New Syllabus and score more marks in your examinations.

Tamilnadu Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scoping

Samacheer Kalvi 12th Computer Science Scoping Text Book Back Questions and Answers

PART – 1
I. Choose The Best Answer

Question 1.
Which of the following refers to the visibility of variables in one part of a program to another part of the same program?
(a) Scope
(b) Memory
(c) Address
(d) Accessibility
Answer:
(a) Scope

Question 2.
The process of binding a variable name with an object is called ………………………….
(a) Scope
(b) Mapping
(c) Late binding
(d) Early binding
Answer:
(b) Mapping

Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scopingn

Question 3.
Which of the following is used in programming languages to map the variable and object?
(a) ::
(b) : =
(c) =
(d) = =
Answer:
(c) =

Question 4.
Containers for mapping names of variables to objects is called ………………………….
(a) Scope
(b) Mapping
(c) Binding
(d) Namespaces
Answer:
(d) Namespaces

Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scopingn

Question 5.
Which scope refers to variables defined in current function?
(a) Local Scope
(b) Global scope
(c) Module scope
(d) Function Scope
Answer:
(a) Local Scope

Question 6.
The process of subdividing a computer program into separate sub – programs is called ………………………….
(a) Procedural Programming
(b) Modular programming
(c) Event Driven Programming
(d) Object oriented Programming
Answer:
(b) Modular programming

Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scopingn

Question 7.
Which of the following security technique that regulates who canuse resources in a computing environment?
(a) Password
(b) Authentication
(c) Access control
(d) Certification
Answer:
(c) Access control

Question 8.
Which of the following members of a class can be handled only from within the class?
(a) Public members
(b) Protected members
(c) Secured members
(d) Private members
Answer:
(d) Private members

Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scopingn

Question 9.
Which members are accessible from outside the class?
(a) Public members
(b) Protected members
(c) Secured members
(d) Private members
Answer:
(a) Public members

Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scopingn

Question 10.
The members that are accessible from within the class and are also available to its subclasses is called ………………………….
(a) Public members
(b) Protected members
(c) Secured members
(d) Private members
Answer:
(b) Protected members

PART – II
II. Answer The Following Questions

Question 1.
What is a scope?
Answer:
Scope refers to the visibility of variables, parameters and functions in one part of a program to another part of the same program.

Question 2.
Why scope should be used for variable. State the reason?
Answer:
Essentially, variables are addresses (references, or pointers), to an object in memory. When you assign a variable with := to an instance (object), you’re binding (or mapping) the variable to that instance. Multiple variables can be mapped to the same instance.

Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scopingn

Question 3.
What is Mapping?
Answer:
The process of binding a variable name with an object is called mapping. = (equal to sign) is used in programming languages to map the variable and object.

Question 4.
What do you mean by Namespaces?
Answer:
Programming languages keeps track of all these mappings with namespaces. Namespaces are containers for mapping names of variables to objects.

Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scopingn

Question 5.
How Python represents the private and protected Access specifiers?
Answer:
Private members of a class are denied access from the outside of the class. They can be handled only within the class.
Protected members of a class are accessible from within the class and are also available to its sub-classes. No other process is permitted access to it.

PART – III
III. Answer The Following Questions

Question 1.
Define Local scope with an example?
Answer:
Local Scope:
Local scope refers to variables defined in current function. Always, a function will first look up for a variable name in its local scope. Only if it does not find it there, the outer scopes are checked.
Look at this example
Samacheer kalvi 12th Computer Science Solutions Chapter 3 Scoping
On execution of the above code the variable a displays the value 7, because it is defined and available in the local scope.

Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scopingn

Question 2.
Define Global scope with an example?
Answer:
Global Scope:
A variable which is declared outside of all the functions in a program is known as global variable. This means, global variable can be accessed inside or outside of all the functions in a program. Consider the following example
Samacheer kalvi 12th Computer Science Solutions Chapter 3 Scoping
On execution of the above code the variable a which is defined inside the function displays the value 7 for the function call Disp( ) and then it displays 10, because a is defined in global scope.

Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scopingn

Question 3.
Define Enclosed scope with an example?
Answer:
Enclosed Scope:
All programming languages permit functions to be nested. A function (method) with in another function is called nested function. A variable which is declared inside a function which contains another function definition with in it, the inner function can also access the variable of the outer function. This scope is called enclosed scope. When a compiler or interpreter search for a variable in a program, it fist search Local, and then search Enclosing scopes. Consider the following example
Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scoping

Question 4.
Why access control is required?
Answer:
Access control is a security technique that regulates who or what can view or use resources in a computing environment.
It is a fundamental concept in security that minimizes risk to the object. In other words access control is a selective restriction of access to data.
In Object oriented programming languages it is implemented through access modifies.
Classical object – oriented languages, such as C++ and Java, control the access to class members by public, private and protected keywords.

Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scopingn

Question 5.
Identify the scope of the variables in the following pseudo code and write its output?
Answer:
Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scoping
Output:
Red, blue, green
Red blue
Red

PART – IV
IV. Answer The Following Questions

Question 1.
Explain the types of scopes for variable or LEGB rule with example?
Answer:
LEGB rule
Scope also defines the order in which variables have to be mapped to the object in order to obtain the value. Let us take a simple example as shown below:

  1. x: = ‘outer x variable’
  2. display ( ):
  3. x: = ‘inner x variable’
  4. print x
  5. display ( )

When the above statements are executed the statement (4) and (5) display the result as
Output
outer x variable
inner x variable
Above statements give different outputs because the same variable name x resides in different scopes, one inside the function display( ) and the other in the upper level. The value ‘outer x variable’ is printed when x is referenced outside the function definition. Whereas when display( ) gets executed, ‘inner x variable’ is printed which is the x value inside the function definition. From the above example, we can guess that there is a rule followed, in order to decide from which scope a variable has to be picked. The LEGB rule is used to decide the order in which the scopes are to be searched for scope resolution. The scopes are listed below in terms of hierarchy (highest to lowest).
Samacheer kalvi 12th Computer Science Solutions Chapter 3 Scoping
Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scoping

Types of Variable Scope:
There are 4 types of Variable Scope, let’s discuss them one by one:

Local Scope:
Local scope refers to variables defined in current function. Always, a function will first look up for a variable name in its local scope. Only if it does not find it there, the outer scopes are checked. Look at this example
Samacheer kalvi 12th Computer Science Solutions Chapter 3 Scoping
On execution of the above code the variable a displays the value 7, because it is defined and available in the local scope.

Global Scope:
A variable which is declared outside of all the functions in a program is known as global variable. This means, global variable can be accessed inside or outside of all the functions in a program. Consider the following example
Samacheer kalvi 12th Computer Science Solutions Chapter 3 Scoping
On execution of the above code the variable a which is defined inside the function displays the value 7 for the function call Disp( ) and then it displays 10, because a is defined in global scope.

Enclosed Scope:
All programming languages permit functions to be nested. A function (method) with in another function is called nested function. A variable which is declared inside a function which contains another function definition with in it, the inner function can also access the variable of the outer function. This scope is called enclosed scope. When a compiler or interpreter search for a variable in a program, it first search Local, and then search Enclosing scopes. Consider the following example
Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scoping
In the above example Disp1 ( ) is defined with in Disp ( ). The variable ‘a’ defined in Disp ( ) can be even used by Disp 1 ( ) because it is also a member of Disp

Built – in Scope:
Finally, we discuss about the widest scope. The built-in scope has all the names that are pre-loaded into the program scope when we start the compiler or interpreter. Any variable or module which is defined in the library functions of a programming language has Built-in or module scope. They are loaded as soon as the library files are imported to the program.
Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scoping
Normally only Functions or modules come along with the software, as packages. Therefore they will come under Built in scope.

Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scopingn

Question 2.
Write any Five Characteristics of Modules?
Answer:
Characteristics of Modules:
The following are the desirable characteristics of a module.

  1. Modules contain instructions, processing logic, and data.
  2. Modules can be separately compiled and stored in a library.
  3. Modules can be included in a program.
  4. Module segments can be used by invoking a name and some parameters.
  5. Module segments can be used by other modules.

Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scopingn

Question 3.
Write any five benefits in using modular programming?
Answer:
The benefits of using modular programming include:

  1. Less code to be written.
  2. A single procedure can be developed for reuse, eliminating the need to retype the code many times.
  3. Programs can be designed more easily because a small team deals with only a small part of the entire code.
  4. Modular programming allows many programmers to collaborate on the same application.
  5. The code is stored across multiple files.
  6. Code is short, simple and easy to understand.
  7. Errors can easily be identified, as they are localized to a subroutine or function.
  8. The same code can be used in many applications.
  9. The scoping of variables can easily be controlled.

Practice Programs

Question 1.
Observe the following diagram and Write the pseudo code for the following?
Answer:
Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scoping
sum ( ):
num 1: = 20
sum 1 ( )
num1: = num1 + 10 sum2 ( )
num1: = num1 + 10
sum2 ( ) sum1 ( ) num1: = 10
sum ( )
Print num 1

Samacheer kalvi 12th Computer Science Scoping Additional Questions and Answers

PART -1
I. Choose The Best Answer

Question 1.
Names paces are compared with ……………………….
(a) Programs
(b) Dictionaries
(c) Books
(d) Notebooks
Answer:
(b) Dictionaries

Question 2.
Write the output (value stored in b)
1. a: = 5
2. b: = a
(a) 0
(b) 3
(c) 5
(d) 2
Answer:
(c) 5

Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scopingn

Question 3.
Find the value of a.
1. a: = 5
2. b: = a
3. a: = 3
(a) 0
(b) 3
(c) 5
(d) 2
Answer:
(b) 3

Question 4.
The ………………………. of a variable is that part of the code where it is visible.
Answer:
Scope

Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scopingn

Question 5.
The duration for which a variable is alive is called its ……………………………
(a) Scale
(b) Life time
(c) Static
(d) Function
Answer:
(b) Life time

Question 6.
…………………………… also defines the order in which variables have to be mapped to the object in order to obtain the value.
(a) Scope
(b) Local
(c) Event
(d) Object
Answer:
(a) Scope

Question 7.
The …………………………… rule is used to decide the order in which the scopes are to be searched for scope resolution.
Answer:
LEGB

Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scopingn

Question 8.
How many types of variable scopes are there?
(a) 1
(b) 2
(c) 3
(d) 4
Answer:
(d) 4

Question 9.
A function will first look up for a variable name in its …………………………… scope.
(a) Local
(b) Enclosed
(c) Global
(d) Built in
Answer:
(a) Local

Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scopingn

Question 10.
A variable which is declared outside of all the functions in a program is known as …………………………… variable.
(a) L
(b) E
(c) G
(d) B
Answer:
(c) G

Question 11.
A …………………………… variable can be accessed inside or outside of all the functions in a program.
(a) Local
(b) Global
(c) Enclosed
(d) Built – in
Answer:
(b) Global

Question 12.
A function defined within another function is called …………………………… function
(a) Member
(b) Looping
(c) Nested
(d) Invariant
Answer:
(c) Nested

Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scopingn

Question 13.
Functions are otherwise called as …………………………..
(a) Methods
(b) Attributes
(c) Class
(d) Structures
Answer:
(a) Methods

Question 14.
The scope of nested function is …………………………… scope
(a) Local
(b) Global
(c) Enclosed
(d) Built – in
Answer:
(c) Enclosed

Question 15.
When a compiler or interpreter search for a variable in a program, it first search and then search …………………………… scope
(a) L, E
(b) EG
(c) GB
(d) BL
Answer:
(a) L, E

Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scopingn

Question 16.
Built – in scopes are called as …………………………… scope.
Answer:
Module

Question 17.
Any variable or module defined in the library functions has …………………………… scope.
Answer:
Built – in

Question 18.
Variables of built – in scopes are loaded as …………………………… files.
(a) Exe
(b) Linker
(c) Object
(d) Library
Answer:
(d) Library

Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scopingn

Question 19.
Identify which is not a variable scope.
(a) Module
(b) Built – in
(c) Enclosed
(d) Pointer
Answer:
(d) Pointer

Question 20.
A single …………………………… can contain one or several statements closely related to each other.
Answer:
Module

Question 21.
A …………………………… is a part of a program.
(a) Code
(b) Module
(c) Flowchart
(d) System software
Answer:
(b) Module

Question 22.
Identify which is not a module?
(a) Algorithm
(b) Procedures
(c) Subroutines
(d) Functions
Answer:
(a) Algorithm

Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scopingn

Question 23.
Find the wrong statement from the following
(a) Modules contains data and instructions
(b) Modules can be included in a program
(c) Modules cannot have processing logic
(d) Modules can be separately combined
Answer:
(c) Modules cannot have processing logic

Question 24.
Which is true about modular programming?
(a) Single procedure can be reused
(b) Single procedure cannot be reused
Answer:
(a) Single procedure can be reused

Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scopingn

Question 25.
The arrangement of private instance variables and public methods ensures the principle of ……………………………
(a) Security
(b) Data encapsulation
(c) Inheritance
(d) Class
Answer:
(b) Data encapsulation

Question 26.
All members in a python class are by …………………………… default.
(a) Private
(b) Public
(c) Protected
(d) Local
Answer:
(b) Public

Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scopingn

Question 27.
The members in C ++ and Java, by default are ……………………………
(a) Private
(b) Public
(c) Protected
(d) Local
Answer:
(a) Private

PART – II
II. Answer The Following Questions

Question 1.
Define life time?
Answer:
The duration for which a variable is alive is called its ‘life time’.

PART – III
III. Answer The Following Questions

Question 1.
Write the output for the pseudo code?
Answer:

  1. x: = ‘outer x variable’
  2. display( ):
  3. x: = ‘inner x variable’
  4. print x
  5. display Q

Output:
outer x variable
inner x variable

Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scopingn

Question 2.
List the scope in hierarchical order from highest to lowest?
Answer:
Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scoping
Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scoping

Question 3.
Write note on modules?
Answer:
A module is a part of a program. Programs are composed of one or more independently developed modules. A single module can contain one or several statements closely related each other. Modules work perfectly on individual level and can be integrated with other modules.

Samacheer Kalvi 12th Computer Science Solutions Chapter 3 Scopingn

Question 4.
Write note on public members?
Answer:
Public members (generally methods declared in a class) are accessible from outside the class. The object of the same class is required to invoke a public method. This arrangement of private instance variables and public methods ensures the principle of data encapsulation.

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Students can Download Computer Science Chapter 8 Strings and String Manipulations Questions and Answers, Notes Pdf, Samacheer Kalvi 12th Computer Science Book Solutions Guide Pdf helps you to revise the complete Tamilnadu State Board New Syllabus and score more marks in your examinations.

Tamilnadu Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Samacheer Kalvi 12th Computer Science Strings and String Manipulations Text Book Back Questions and Answers

PART – I
I. Choose The Best Answer

Question 1.
Which of the following is the output of the following python code?
Answer:
str1=”TamilNadu”
print (str1 [:: -1])
(a) Tamilnadu
(b) Tmlau
(c) UdanlimaT
(d) UdaNlimaT
Answer:
(c) UdanlimaT

Question 2.
What will be the output of the following code?
Answer:
str1= “Chennai Schools”
str1[7] = “_”
(a) Chennai – Schools
(b) Chenna – School
(c) Type error
(d) Chennai
Answer:
(c) Type error

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 3.
Which of the following operator is used for concatenation?
(a) +
(b) &
(c) *
(d) =
Answer:
(a) +

Question 4.
Defining strings within triple quotes allows creating:
(a) Single line Strings
(b) Multiline Strings
(c) Double line Strings
(d) Multiple Strings
Answer:
(b) Multiline Strings

Question 5.
Strings in python:
(a) Changeable
(b) Mutable
(c) Immutable
(d) Flexible
Answer:
(c) Immutable

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 6.
Which of the following is the slicing operator?
(a) { }
(b) [ ]
(c) <>
(d) ( )
Answer:
(b) [ ]

Question 7.
What is stride?
(a) Index value of slide operation
(b) First argument of slice operation
(c) Second argument of slice operation
(d) Third argument of slice operation
Answer:
(d) Third argument of slice operation

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 8.
Which of the following formatting character is used to print exponential notation in upper case?
(a) % e
(b) % E
(c) % g
(d) % n
Answer:
(b) % E

Question 9.
Which of the following is used as placeholders or replacement fields which get replaced along with format ( ) function?
(a) { }
(b) <>
(c) ++
(d) ^^
Answer:
(a) { }

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 10.
The subscript of a string may be:
(a) Positive
(b) Negative
(c) Both (a) and (b)
(d) Either (a) or (b)
Answer:
(d) Either (a) or (b)

PART – II
II. Answer The Following Questions

Question 1.
What is String?
Answer:
String is a data type in python, which is used to handle array of characters. String is a sequence of Unicode characters that may be a combination of letters, numbers, or special symbols enclosed within single, double or even triple quotes.
Example:
‘Welcome to learning Python’
“Welcome to learning Python”
“Welcome to learning Python”

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 2.
Do you modify a string in Python?
Answer:
If you want to modify the string, a new string value can be assign to the existing string variable. To define a new string value to the existing string variable. Python completely overwrite new string on the existing string.
Example:
>>> str1=”How are you”
>>> print (str1)
How are you
>>> str1=”How about you”
>>> print (str1)
How about you

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 3.
How will you delete a string in Python?
Answer:
Python will not allow deleting a particular character in a string. Whereas you can remove entire string variable using del command.
Example: Code lines to delete a string variable
>>> str1=”How about you”
>>> print (str1)
How about you
>>> del str1
>>> print (str1)
NameError: name ‘str1’ is not defined

Question 4.
What will be the output of the following python code?
Answer:
str1 = “School”
print (str1*3)
Output:
School School School

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 5.
What is slicing?
Answer:
String slicing:
Slice is a substring of a main string. A substring can be taken from the original string by using [ ] operator and index or subscript values. Thus, [ ] is also known as slicing operator. Using slice operator, we can slice one or more substrings from a main string.

General format of slice operation:
str[start:end]
Where start is the beginning index and end is the last index value of a character in the string. Python takes the end value less than one from the actual index specified. For example, if you want to slice first 4 characters from a string, you have to specify it as 0 to 5. Because, python consider only the end value as n – 1.
Example: slice a single character from a string
>>> str1=”THIRUKKURAL”
>>> print (str1[0])
T

PART – III
III. Answer The Following Questions

Question 1.
Write a Python program to display the given pattern?
Answer:
C O M P U T E R
C O M P U T E
C O M P U T
C O M P U
C O M P
C O M
C O
C
Program:
str1 = “COMPUTER”
index = len (str1)
for i in str 1:
print (str 1[: index])
index – = 1

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 2.
Write a short about the followings with suitable example?
Answer:
Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 3.
What will be the output of the given python program?
str1 = “welcome”
str2 = “to school”
str3 = str1[: 2] str2[len(str2)-2:]
print (str3)
output:
Answer:
weoo 1

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 4.
What is the use of format( )? Give an example?
Answer:
The format( ) function used with strings is very versatile and powerful function used for formatting strings. The curly braces { } are used as placeholders or replacement fields which get replaced along with format( ) function.
Example:
num1 = int (input (“Number 1: “))
num2 = int (input (“Number 2: “))
print (“The sum of { } and { } is { }”.format (num1, num2,(num1 + num2)))
OutPut:
Number 1 : 34
Number 2 : 54
The sum of 34 and 54 is 88.

Question 5.
Write a note about count ( ) function in python?
Answer:
Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

PART – IV
IV. Answer The Following Questions.

Question 1.
Explain about string operators in python with suitable example?
Answer:
String Operators:
Python provides the following operators for string operations. These operators are useful to manipulate string.

(i) Concatenation (+):
Joining of two or more strings is called as Concatenation. The plus (+) operator is used to concatenate strings in python.
Example:
>>> “welcome” + “Python”
‘welcomePython’

(ii) Append (+=):
Adding more strings at the end of an existing string is known as append. The operator += is used to append a new string with an existing string.
Example:
>>> str1 =”Welcome to ”
>>> str1+=”Leam Python”
>>> print (str1)
Welcome to Learn Python

(iii) Repeating (*):
The multiplication operator (*) is used to display a string in multiple number of times.
Example:
>>> str1 =”Welcome”
>>> print (str1*4)
Welcome Welcome Welcome Welcome

(iv) String slicing:
Slice is a substring of a main string. A substring can be taken from the original string by using [ ] operator and index or subscript values. Thus, [ ] is also known as slicing operator. Using slice operator, you have to slice one or more substrings from a main string.
General format of slice operation:
str[start: end]
Where start is the beginning index and end is the last index value of a character in the string. Python takes the end value less than one from the actual index specified. For example, if you want to slice first 4 characters from a string, you have to specify it as 0 to 5. Because, python consider only the end value as n – 1.
Example:
(i) slice a single character from a string
>>> str1=”THIRUKKURAL ”
>>> print (str1 [0])
T .

(v) Stride when slicing string
When the slicing operation, you can specify a third argument as the stride, which refers to the number of characters to move forward after the first character is retrieved from the string. The default value of stride is 1.
Example:
>>> str1= “Welcome to learn Python”
>>> print (str1 [10:16])
learn
Note: Remember that, python takes the last value as n – 1
You can also use negative value as stride (third argument). If you specify a negative value, it prints in reverse order.
Example:
>>> str1 = “Welcome to learn Python”
>>> print(str1 [::-2])
nhy re teoIW

Practice Programs

Question 1.
Write a python program to find the length of a string?
Answer:
str=input (“Enter a string: “)
print (len(str))
Output:
Enter a string: HELLO
5

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 2.
Write a program to count the occurrences of each word in a given string?
Answer:
def word_count(str):
counts = dict ( )
words = str.split ( ) for word in words:
if word in counts:
counts[word] +=1
else:
counts[word]=1
return counts
print (word_count (‘the quick brown fox jumps over the lazy dog.’))
Ouput:
{‘the’: 2, ‘jumps’: 1, ‘brown’: 1, ‘lazy’: 1, ‘fox’: 1, ‘over’: 1, ‘quick’: 1, ‘dog’: 1}

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 3.
Write a program to add a prefix text to all the lines in a string?
Answer:
import
text =
“‘Strings are immutable. Slice is a
substring of a main string. Stride
is a third argument in slicing operation'”
text_without_lndentation= textwrap.dedent (text)
wrapped = extwrap.fill (text_without_Indentation, width = 50)
print (textwrap.indent(wrapped, ‘*’)
print ()
Output:

  • Strings are immutable. Slice is a
  • substring of a main string. Stride
  • is a third argument in slicing operation

Question 4.
Write a program to print integers with ‘*’ on the right of specified width?
Answer:
x = 1 2 3
print (“original number: “, x)
print (“formatted number(right padding, width 6): “+” {: * < 7 d}”.format(x));
Output:
original number : 1 2 3
formatted number (right padding, width 6): 1 2 3 ***

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 5.
Write a program to create a mirror of the given string. For example, “wel” = “lew“?
Answer:
str1 = input (“Enter a string: “)
str2 = ‘ ‘
index= -1
for i in str1:
str2 += str1 [index]
index -= 1
print (“The given string = { } \n The Reversed string = { }”.format(str 1, str 2))
Output:
Enter a string: welcome
The given string = welcome
The Reversed string = emoclew

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 6.
Write a program to removes all the occurrences of a given character in a string?
Answer:
def removechar(s,c):
# find total no of occurrence of a character
counts = s.count(c)
# convert into list of characters
s = list(s)
# keep looping until counts become 0
while counts:
# remove char, from list
s.remove(c)
counts -= 1
# join remaining characters s = ” .join(s)
print(s)
s = “python programming”‘
remove char(s, ‘p’)
Output:
ython rogramming

Question 7.
Write a program to append a string to another string without using + = operator?
Answer:
s1 = input (“Enter the first string: “)
s2 = input (“Enter the second string: “)
print (‘concatenated strings =’,” ” ,join ([s1, s2]))
Output:
Enter the first string: Tamil
Enter the second string: Nadu
concatenated strings = Tamil Nadu

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 8.
Write a program to swap two strings?
Answer:
print (“Enter Y for exit.”)
string1 = input(“Enter first string: “)
if string1 = = ‘x’:
exit();
else:
string2 = input (“Enter second string : “)
print (” \n Both strings before swap : “)
print (“First string = “, string1)
print (” Second string = “, string2)
temp = string1
string1 = string2
string2 = temp
print (“\n Both strings after swap: “)
print (“First string = “, string1)
print (” Second string = “, string2)
Output:
Enter ‘x’ for exit
Enter first string: code
Enter second string: python
Both strings before swap:
First string = code
Second string = python
Both strings after swap:
First string = python
Second string = code

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 9.
Write a program to replace a string with another string without using replace ( )?
Answer:
s1 = input (“Enter the string to be replaced: “)
s2 = input (“Enter the string to replace with “)
s1 = s2
print (“Replaced string is “, s1)
Output:
Enter the string to be replaced: Computer
Enter the string to replace with: repcomputer
Replaced string is repcomputer

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 10.
Write a program to count the number of characters, words and lines in a given string?
Answer:
string = input (“Enter string:”)
char = 0
word = 0
line = 0
for i in string:
char = char + 1
if (i = = “):
word = word + 1
elif (i = = ‘ \n’):
line = line +1
print (“Number of words in the string: “)
print (word)
print (“Number of characters in the string: “)
print (char)
print (“Number of lines in the string: “)
print (line)
Output:
Enter string: welcome to learning python
Number of words in the string : 4
Number of characters in the string : 26
Number of lines in the string : 1

Samacheer kalvi 12th Computer Science Strings and String Manipulations Additional Questions and Answers

PART – 1
I. Choose The Correct Answer

Question 1.
Strings in python can be created using ………………………….. quotes
(a) Single
(b) Double
(c) Triple
(d) All the above
Answer:
(d) All the above

Question 2.
Strings which contains double quotes should be defined with …………………….. quotes
(a) Single
(b) Double
(c) Triple
(d) All the these
Answer:
(c) Triple

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 3.
The positive subscript of the string starts from ………………………….. and ends with …………………………
Answer:
0, n – 1

Question 4.
In strings, the negative index assigned from the last character to the first character in reverse order begins with …………………………
(a) 0
(b) 1
(c) -1
(d) -2
Answer:
(c) -1

Question 5.
How will you modify the string?
(a) A new string value can be assigned to the existing string variable
(b) Updating the string character by character
Answer:
(a) A new string value can be assigned to the existing string variable

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 6.
Which function is used to change all occurrences of a particular character in a string?
(a) Replace ( )
(b) Change ( )
(c) Edit ( )
(d) Append ( )
Answer:
(a) Replace ( )

Question 7.
Which command is used to remove the entire string variable?
(a) Remove
(b) Del
(c) Delete
(d) Strike
Answer:
(b) Del

Question 8.
Joining of two or more strings is called as …………………………..
(a) Append
(b) Repeating
(c) Concatenation
(d) Strike
Answer:
(c) Concatenation

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 9.
Adding more strings at the end of an existing strings is ………………………….
(a) Append
(b) Concatenation
(c) Repeating
(d) Slicing
Answer:
(a) Append

Question 10.
Find the wrongly matched pair from the following.
(a) Append ⇒ + =
(b) Concate ⇒ +
(c) Repeat ⇒ /
(d) Slice ⇒ [ ]
Answer:
(c) Repeat ⇒ /

Question 11.
Which operator is used to append a new string with an existing string?
(a) +
(b) + =
(c) *
(d) * =
Answer:
(b) + =

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 12.
The multiplication operator is also called as ………………………….
(a) Append
(b) Concatenate
(c) Repeat
(d) Slice
Answer:
(c) Repeat

Question 13.
Which is used to display a string multiple number of times?
(a) Repeating
(b) *
(c) Multiplication operator
(d) All the above
Answer:
(d) All the above

Question 14.
…………………………. is a substring of a main string.
Answer:
Slice

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 15.
In python, end value is considered as ……………………….
(a) 0
(b) n
(c) n – 1
(d) 1
Answer:
(c) n – 1

Question 16.
Find the wrong statement from the following.
(I) Slice a single character from a string
(II) Slice a substring
(III) Slice a substring without specifying beginning index
(IV) Slice a substring without specifying end index

(a) (I), (II)
(b) (II), (III), (IV)
(c) All are wrong
(d) All are correct
Answer:
(d) All are correct

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 17.
The default value of stride is …………………………
(a) 0
(b) 1
(c) n
(d) n – 1
Answer:
(b) 1

Question 18.
If the stride is negative, then it will prints
(a) Third character
(b) Third word
(c) Full string
(d) Reverse order
Answer:
(d) Reverse order

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 19.
…………………………. is the formatting character for signed decimal integer.
(a) %d or %i
(b) %d and %i
(c) %d %u
(d) %i &u
Answer:
(a) %d or %i

Question 20.
…………………….. is the formatting character for short numbers in floating point or exponential notation.
Answer:
% g or % G

Question 21.
Escape sequences starts with a ………………………..
Answer:
Back Slash

Question 22.
Find the wrong match
(a) Backslash – \b
(b) Backslash – //
(c) Carriage return – \r
(d) Line feed – \n
Answer:
(b) Backslash – //

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 23.
Which function returns the length of the string?
(a) str len( )
(b) len(str)
(c) length( )
(d) strlength( )
Answer:
(b) len(str)

Question 24.
The function isalnum( ) returns ………………………. when it contains special characters.
Answer:
False

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 25.
How many membership operators are there?
(a) 2
(b) 3
(c) 4
(d) 5
Answer:
(a) 2

Question 26.
……………………. is the membership operator.
(a) is
(b) at
(c) to
(d) in
Answer:
(d) in

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 27.
……………………. function is a powerful function used for formatting strings.
Answer:
Format ( )

Question 28.
The ……………………. and ………………………. operators can be used with strings to determine whether a string is present another string.
Answer:
In, Not in

PART – II
II. Answer The Following Questions

Question 1.
Fill the Table with appropriate values.
Answer:
Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 2.
Find the output?
Answer:
Program
str1 = ‘ * ‘
i=1
while i<=5: print (str1*i)
i+=1
Output
*
* *
* * *
* * * *
* * * * *

PART – III
III. Answer The Following Question

Question 1.
Write note on replace function?
Answer:
The replace function replaces all occurrences of char 1 with char 2.
Example
>>> str1 =”How are you”
>>> print (str1)
How are you
>>>print (str1.replace(“o”, “e”))
Hew are yeu

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 2.
Write note on Append Operator?
Answer:
Append (+ =)
Adding more strings at the end of an existing string is known as append. The operator + = is used to append a new string with an existing string.
Example:
>>> str1=’Welcome to ”
>>> str1+=”Leam Python”
>>> print (str1)
Welcome to Learn Python

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 3.
Give any 6 formatting characters with their usage?
Formatting characters
Answer:
Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Question 4.
Write any 6 escape sequences with their description?
Answer:
Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

PART – IV
IV. Answer The Following Questions

Question 1.
Explain any 10 Built-in string functions?
Answer:
Built – in String functions
Python supports the following built – in functions to manipulate string.
Samacheer Kalvi 12th Computer Science Solutions Chapter 8 Strings and String Manipulations

Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction

Students can Download Computer Science Chapter 2 Data Abstraction Questions and Answers, Notes Pdf, Samacheer Kalvi 12th Computer Science Book Solutions Guide Pdf helps you to revise the complete Tamilnadu State Board New Syllabus and score more marks in your examinations.

Tamilnadu Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction

Samacheer Kalvi 12th Computer Science Data Abstraction Text Book Back Questions and Answers

PART – I
I. Choose The Best Answer

Question 1.
Which of the following functions that build the abstract data type?
(a) Constructors
(b) Destructors
(c) Recursive
(d) Nested
Answer:
(a) Constructors

Question 2.
Which of the following functions that retrieve information from the data type?
(a) Constructors
(b) Selectors
(c) Recursive
(d) Nested
Answer:
(b) Selectors

Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction

Question 3.
The data structure which is a mutable ordered sequence of elements is called ………………………
(a) Built in
(b) List
(c) Tuple
(d) Derived data
Answer:
(b) List

Question 4.
A sequence of immutable objects is called ………………………
(a) Built in
(b) List
(c) Tuple
(d) Derived data
Answer:
(c) Tuple

Question 5.
The data type whose representation is known are called ………………………
(a) Built in data type
(b) Derived data type
(c) Concrete data type
(d) Abstract data type
Answer:
(c) Concrete data type

Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction

Question 6.
The data type whose representation is unknown are called ………………………
(a) Built in data type
(b) Derived data type
(c) Concrete data type
(d) Abstract datatype
Answer:
(d) Abstract datatype

Question 7.
Which of the following is a compound structure?
(a) Pair
(b) Triplet
(c) Single
(d) Quadrat
Answer:
(a) Pair

Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction

Question 8.
Bundling two values together into one can be considered as ………………………
(a) Pair
(b) Triplet
(c) Single
(d) Quadrant
Answer:
(a) Pair

Question 9.
Which of the following allow to name the various parts of a multi – item object?
(a) Tuples
(b) Lists
(c) Classes
(d) quadrats
Answer:
(c) Classes

Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction

Question 10.
Which of the following is constructed by placing expressions within square brackets?
(a) Tuples
(b) Lists
(c) Classes
(d) Quadrats
Answer:
(b) Lists

PART – II
II. Answer The Following Questions

Question 1.
What is abstract data type?
Answer:
Abstract Data type (ADT) is a type (or class) for objects whose behavior is defined by a set of value and a set of operations. The definition of ADT only mentions what operations are to be performed but not how these operations will be implemented.

Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction

Question 2.
Differentiate constructors and selectors?
Answer:
Constructors are functions that build the abstract data type. Selectors are functions that retrieve information from the data type.
To create a city object, you’d use a function like
city = makecity (name, lat, Ion)
To extract the information of a city object, you would use functions like
getname (city)

Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction

Question 3.
What is a Pair? Give an example?
Answer:
Pair is a compound structure which is made up of list or Tuple.
lst[(0, 10), (1, 20)] -where
Samacheer kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction
Any way of bundling two values together into one can be considered as a pair. Lists are a common method to do so. Therefore List can be called as Pairs.

Question 4.
What is a List? Give an example?
Answer:
List is constructed by placing expressions within square brackets separated by commas. Example for List is [10, 20].

Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction

Question 5.
What is a Tuple? Give an example?
Answer:
A tuple is a comma-separated sequence of values surrounded with parentheses. Tuple is similar to a list. The difference between the two is that you cannot change the elements of a tuple once it is assigned whereas in a list, elements can be changed.
Example colour = (‘red’, ‘blue’, ‘Green’)

PART – III
III. Answer The Following Questions

Question 1.
Differentiate Concrete data type and abstract datatype?
Answer:
Concrete data type:

  1. A concrete data type is a data type whose representation is known.
  2. Concrete data types or structures (CDT’s) are direct implementations of a relatively simple concept.

Abstract data type:

  1. Abstract data type the representation of a data type is unknown.
  2. Abstract Data Types (ADT’s) offer a high level view (and use) of a concept independent of its implementation.

Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction

Question 2.
Which strategy is used for program designing? Define that Strategy?
Answer:
We are using here a powerful strategy for designing programs: ‘wishful thinking’.
Wishful Thinking is the formation of beliefs and making decisions according to what might be pleasing to imagine instead of by . appealing to reality.

Question 3.
Identify Which of the following are constructors and selectors?
Answer:
(a) N1 = number ( ) – constructors
(b) Accetnum (n1) – selectors
(c) Displaynum (n1) – selectors
(d) eval (a/b) – selectors
(e) x, y = makeslope(m), makeslope (n) – constructors
(f) display O – selectors

Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction

Question 4.
What are the different ways to access the elements of a list. Give example?
Answer:
List is constructed by placing expressions within square brackets separated by commas. Example for List is [10, 20].
The elements of a list can be accessed in two ways. The first way is via our familiar method of multiple assignment, which unpacks a list into its elements and binds each element to a different name.
1st: = [10, 20]
x, y: = 1st
In the above example x will become 10 and y will become 20.
A second method for accessing the elements in a list is by the element selection operator, also expressed using square brackets. Unlike a list literal, a square – brackets expression directly following another expression does not evaluate to a list value, but instead selects an element from the value of the preceding expression.
1st [0]
10
1st [1]
20

Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction

Question 5.
Identify Which of the following are List, Tuple and class?
(a) arr [1, 2, 34]
(b) arr (1, 2, 34)
(c) student [rno, name, mark]
(d) day = (‘sun’, ‘mon’, ‘tue’, ‘wed’)
(e) x= [2, 5, 6.5, [5,6], 8.2]
(f) employee [eno, ename, esal, eaddress]
Answer:
List: (a) arr [1, 2, 34]
(e) x= [2, 5, 6.5, [5,6], 8.2]
Tuple: (b) arr (1, 2, 34)
(d) day = (‘sun’, ‘mon’, ‘tue’, ‘wed’)
Class: (c) student [mo, name, mark]
(f) employee [eno, ename, esal, eaddress]

PART – IV
IV. Answer The Following Questions

Question 1.
How will you facilitate data abstraction. Explain it with suitable example?
Answer:
The definition of ADT only mentions what operations are to be performed but not how these operations will be implemented. It does not specify how data will be organized in memory and what algorithms will be used for implementing the operations. It is called “abstract” because it gives an implementation independent view. The process of providing only the essentials and hiding the details is known as abstraction.
To facilitate data abstraction, you will need to create two types of functions.

constructors and selectors:
Constructors are functions that build the abstract data type. Selectors are functions that retrieve information from the data type.
To create a city object, you’d use a function like city = makecity (name, lat, Ion)
To extract the information of a city object, you would use functions like

  1. getname(city)
  2. getlat(city)
  3. getlon(city)

In the above pseudo code the function which creates the object of the city is the constructor, city = makecity (name, lat, Ion)
Here makecity (name, lat, Ion) is the constructor which creates the object city.
Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction
Selectors are nothing but the functions that retrieve information from the data type. Therefore in the above code

  1. getname(city)
  2. getlat(city)
  3. getlon(city)

are the selectors because these functions extract the information of the city object.
Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction
Data abstraction is supported by defining an abstract data type (ADT), which is a collection of constructors and selectors. Constructors create an object, bundling together different pieces of information, while selectors extract individual pieces of information from the object.

Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction

Question 2.
What is a List? Why List can be called as Pairs. Explain with suitable example?
Answer:
List is constructed by placing expressions within square brackets separated by commas. Example for List is [10, 20],
The elements of a list can be accessed in two ways. The first way is via our familiar method of multiple assignment, which unpacks a list into its elements and binds each element to a different name.
1st: = [10, 20]
x, y: = 1st
In the above example x will become 10 and y will become 20.
A second method for accessing the elements in a list is by the element selection operator, also expressed using square brackets. Unlike a list literal, a square – brackets expression directly following another expression does not evaluate to a list value, but instead selects an element from the value of the preceding expression.
1st [0]
10
1st [1]
20
In both the example mentioned above mathematically we can represent list similar to a set.
1st [(0, 10), (1, 20)] – where
Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction
Any way of bundling two values together into one can be considered as a pair. Lists are a common method to do so. Therefore List can be called as Pairs.

Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction

Question 3.
How will you access the multi – item. Explain with example?
Answer:
List allow data abstraction in that you can give a name to a set of memory cells. For instance, in the game Mastermind, you must keep track of a list of four colors that the player guesses. Instead of using four separate variables (color 1, color2, color3, and color4) you can use a single variable ‘Predict’, e.g.,
Predict = [‘red’, ‘blue’, ‘green’, ’green’]
What lists do not allow us to do is name the various parts of a multi- item object. In the case of a Predict, you don’t really need to name the parts:
using an index to get to each color suffices.
But in the case of something more complex, like a person, we have a multi – item object where each ‘item’ is a named thing: the firstName, the last Name, the id, and the email. One could use a list to represent a person.
Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction
Person = [‘Padmashri’, ‘Baskar’, ‘994 – 222 – 1234’, ‘[email protected]’]
but such a representation doesn’t explicitly specify what each part represents.
For this problem instead of using a list, you can use the structure constmct (In OOP languages it’s called class construct) to represent multi-part objects where each part is named (given a name). Consider the following pseudo code:
class Person:
creation( )
firstName: = “”
lastName: = ” ”
id: = ” ”
email : = “”
The new data type Person is pictorially represented as
Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction
The class (structure) constmct defines the form for multi – part objects that represent a person. Its defintion adds a new data type, in this case a type named Person. Once defined, we can create new variables (instances) of the type. In this example Person is referred to as a class or a type, while p1 is referred to as an object or an instance. You can think of class Person as a cookie cutter, and p1 as a particular cookie. Using the cookie cutter you can make many cookies. Same way using class you can create many objects of that type.

Samacheer kalvi 12th Computer Science Data Abstraction Additional Questions and Answers

PART – 1
I. Choose The Best Answer

Question 1.
How many types of functions are needed to facilitate abstraction?
(a) 1
(b) 2
(c) 3
(d) 4
Answer:
(b) 2

Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction

Question 2.
ADT stands for …………………………..
(a) Advanced Data Typing
(b) Application Developing Tool
(c) Abstract data types
(d) Advanced data types
Answer:
(c) Abstract data types

Question 3.
The Splitting of program into many modules are called as ……………………………
(a) Modularity
(b) Structures
(c) Classes
(d) List
Answer:
(a) Modularity

Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction

Question 4.
……………………………. are the representation for ADT.
(a) List
(b) Classes
(c) Int
(d) Float
Answer:
(b) Classes

Question 5.
Linked list are of …………………………..
(a) Single
(b) Double
(c) Multiple
(d) Both a and b
Answer:
(d) Both a and b

Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction

Question 6.
The process of providing only the essentials and hiding the details is known as …………………………..
(a) Modularity
(b) Structure
(c) Tuple
(d) Abstraction
Answer:
(d) Abstraction

Question 7.
Identify the constructor from the following
(a) City = makecity(name, lat, lon)
(b) getname(city)
(c) getlat(city)
(d) getlon(city)
Answer:
(a) City = makecity(name, lat, lon)

Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction

Question 8.
: = is called as …………………………..
(a) Assigned as
(b) Becomes
(c) Both a and b
(d) None of these
Answer:
(c) Both a and b

Question 9.
In list 1st [(0, 10), (1, 20)] – 0 and 1 represents …………………………..
(a) Value
(b) Index
(c) List identifier
(d) Tuple
Answer:
(b) Index

Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction

Question 10.
How many ways of representing pair data type are there?
(a) 1
(b) 2
(c) 3
(d) 4
Answer:
(b) 2

Question 11.
nums [1] represent that you are accessing ………………………….. element.
(a) 0
(b) 1
(c) 2
(d) 3
Answer:
(b) 1

Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction

Question 12.
nums [1] indicate that we are accessing ………………………….. element.
(a) 0
(b) 1
(c) 2
(d) many
Answer:
(c) 2

Question 13.
How many objects can be created from a class?
(a) 0
(b) 1
(c) 2
(d) many
Answer:
(d) many

PART – II
II. Answer The Following Questions

Question 1.
What are the two parts of a program?
Answer:
The two parts of a program are, the part that operates on abstract data and the part that defines a concrete representation.

Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction

Question 2.
Give the pseudo code to represent a rational number as a pair of two integers?
Answer:
You can now represent a rational number as a pair of two integers in pseudo code: a numerator and a denominator.
rational (n, d):
return [n, d]
numer (x):
return x [0]
denom (x):
return x [1]

Question 3.
What are the two ways of representing the pair data type?
Answer:
Two ways of representing the pair data type. The first way is using List construct and the second way to implement pairs is with the tuple construct.

Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction

Question 4.
Differentiate tuple and list?
List:
In List square bracket is used.

Tuple:
In Tuple parenthesis is used.

Question 5.
Give an example for representation of Tuple as a pair?
Answer:
Representation of Tuple as a Pair
nums : = (1, 2)
nums [0]
1
nums [1]
2

Samacheer Kalvi 12th Computer Science Solutions Chapter 2 Data Abstraction

Question 6.
Define class?
Answer:
A class as bundled data and the functions that work on that data.

PART – III
III. Answer The Following Questions

Question 1.
Give the pseudo code to compute the distance between two city objects?
Answer:
The following pseudo code will compute the distance between two city objects:
distance(city 1, city2):
1t1, 1g1: = getlat (city1), getlon (city1)
1t2, 1g2: = getlat (city2), getlon (city2)
return ((1t1 – 1t2) ** 2 + (1g1 – 1g2) ** 2)1/2