This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 118951. |
Write any 6 escape sequences with their description? |
||||||||||||||
Answer»
|
|||||||||||||||
| 118952. |
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 |
|
| 118953. |
The function isalnum( ) returns ………when it contains special characters. |
|
Answer» The function isalnum( ) returns False when it contains special characters. |
|
| 118954. |
Complete the following statements :When the sun is setting, the light from it has to travel a ……………… thickness of the earth’s atmosphere and only…….. wavelength……… light is able to reach us. Sunset is therefore………. |
|
Answer» When the sun is setting, the light from it has to travel a greaater thickness of the earth’s atmosphere and only longer wavelength red light is able to reach us. Sunset is therefore red |
|
| 118955. |
On which step programming methodology used ? |
|
Answer» Before writing program. |
|
| 118956. |
What value has been check by ” > = ” operator? |
|
Answer» It checks if the value of left operand is greater than or equal to the value of right operand, if yes then condition becomes true. |
|
| 118957. |
What value have been check by ” < = ” operator? |
|
Answer» It checks if the value of left operand is less than or equal to the value of right operand, if yes then condition becomes true. |
|
| 118958. |
Is there an equivalent of C’s “?:” ternary operator in Python ? |
|
Answer» No, there are not equivalent of C’s “?:” ternary operator in Python. |
|
| 118959. |
What is ISCII ? |
|
Answer» It is an acronym for Indian Standard Code for Information Interchange. It is an 8-bit code so it has 28 = 256 possible code groups. It retains all ASCII characters and offers to code for Indian characters also. |
|
| 118960. |
What do you understand by Unicode ? |
|
Answer» It is the new universal coding standard being adopted for all newer platforms. Unicode provides a unique number for every character, no matter what the platform or program or the language is. |
|
| 118961. |
Is ” < =” a Assignment operator ? |
|
Answer» No,”< =” is not assignment operator. |
|
| 118962. |
Write source in Python code for identity operators. |
|
Answer» Following example to understand all the identity operators available in Python programming language : # !/usr/bin/py thon a = 20 b = 20 if (a is b): print “Line 1 – a and b have same identity” else: print “Line 1 – a and b do not have same identity” if (id(a) = = id(b)): print “Line 2 – a and b have same identity” else: print “Line 2 – a and b do not have same identity” b = 30 if (a is b ): print “Line 3 – a and b have same identity” else: print “Line 3 – a and b do not have same identity” if (a is not b ): print “Line 4 – a and b do not have same identity” else: print “Line 4 – a and b have same identity” When you execute the above program it produces following result: Line 1 – a and b have same identity Line 2 – a and b have same identity Line 3 – a and b do not have same identity Line 4 – a and b do not have same identity |
|
| 118963. |
Write a program in Python to explain assignment operators |
|
Answer» Following example to understand all the assignment operators available in Python programming language : # !/usr/bin/python a = 21 b = 10 c = 0 c = a + b print “Line 1 – Value of c is “, c c += a print “Line 2 – Value of c is “, c c *= a print “Line 3 – Value of c is “, c c/= a print “Line 4 – Value of c is “, c c = 2 c %= a print “Line 5 – Value of c is “, e c**= a print “Line 6 – Value of c is “, c c//= a print “Line 7 – Value of c is “, c When you execute the above program it produces following result: Line 1 – Value of c is 31 Line 2 – Value of c is 52 Line 3 – Value of c is 1092 Line 4 – Value of c is 52 Line 5 – Value of c is 2 Line 6 – Value of c is 2097152 Line 7 – Value of c is 99864 |
|
| 118964. |
Write source code in Python to explain bitwise operators. |
|
Answer» Following example to understand all the bitwise operators available in Python programming language: # !/usr/bin/python a = 60 # 60 = 0011 1100 b = 13 # 13 = 0000 1101 c = 0 c = a & b; # 12 = 0000 1100 print “Line 1 – Value of c is “, c c = a | b; # 61 = 0011 1101 print “Line 2 – Value of c is “, c c = a ∧ b; # 49 = 0011 0001 print “Line 3 – Value of c is “, c c = ~a; # -61 = 1100 0011 print “Line 4 – Value of c is “, c c = a < < 2; #240 = 1111 0000 print “Line 5 – Value of c is “, c c = a > > 2; # 15 = 00001111 print “Line 6 – Value of c is “, c When you execute the above program it produces following result: Line 1 – Value of c is 12 Line 2 – Value of c is 61 Line 3 – Value of c is 49 Line 4 – Value of c is -61 Line 5 – Value of c is 240 Line 6 – Value of c is 15 |
|
| 118965. |
What is ASCII ? |
|
Answer» It is an acronym for the American Standard Code for Information Interchange. It is used in most microcomputers and minicomputers and in many mainframes. It is a 7-bit code so it has 27 = 128 possible code groups. |
|
| 118966. |
What will be the output of the following code : a = 3 – 4 + 10 b = 5 * 6 c = 7.0/8.0 |
|
Answer» Print “These are the values a, b, c. These are the values : 9300.0. |
|
| 118967. |
Write source in Python code for membership operators. |
|
Answer» Following example to understand all the membership operators available in Python programming language : #!/usr/bin/python a = 10 b = 20 list = [1,2,3,4, 5 ]; if ( a in list): print “Line 1 – a is available in the given list” else: print “Line 1 – a is not available in the given list” if (b not in list): print “Line 2 – b is not available in the given list” else: print “Line 2 – b is available in the given list” a = 2 if ( a in list): print “Line 3 – a is available in the given list” else: print “Line 3 – a is not available in the given list” When you execute the above program it produces following result: Line 1 – a is not available in the given list Line 2 – b is not available in the given list Line 3 – a is available in the given list |
|
| 118968. |
The plane x = 0 and y = 0 is :(a) parallel(b) perpendicular to each other(c) intersect at z-axis(d) none of these |
|
Answer» Answer is (b) perpendicular to each other |
|
| 118969. |
Write a example of comparison operators. |
|
Answer» Following example to understand all the comparison operators available in Python programming language: # !/usr/bin/python a = 21 b = 10 c = 0 if (a = = b ): print “Line 1 – a is equal to b” else: print “Line 1 – a is not equal to b” if ( a ! = b ): print “Line 2 – a is not equal to b” else: print “Line 2 – a is equal to b” if (a <> b): print “Line 3 – a is not equal to b” else: print “Line 3 – a is equal to b” if ( a < b ): print “Line 4 – a is less than b” else: print “Line 4 – a is not less than b” if (a > b ): print “Line 5 – a is greater than b” else: print “Line 5 – a is not greater than b” a = 5; b = 20; if (a < = b): print “Line 6 – a is either less than or equal to b” else: print “Line 6 – a is neither less than nor equal to b” if (b > = a): print “Line 7 – b is either greater than or equal to b” else: print “Line 7 – b is neither greater than nor equal to b” When you execute the above program it produces following result: Line 1 – a is not equal to b Line 2 – a is not equal to b Line 3 – a is not equal to b Line 4 – a is not less than b Line 5 – a is greater than b Line 6 – a is either less than or equal to b Line 7 – b is either greater than or equal to b |
|
| 118970. |
Give an example of arithmetic operators. |
|
Answer» Following example to understand all the arithmetic operators available in Python programming language: # !/usr/bin/python a = 21 b = 10 c = 0 c = a + b print “Line 1 – Value of c is “, c c = a -b print “Line 2 – Value of c is “, c c = a * b print “Line 3 – Value of c is “, c c = a/b print “Line 4 – Value of c is “, c c = a % b print “Line 5 – Value of c is “, c a = 2 b = 3 c = a**b print “Line 6 – Value of c is “, c a = 10 b = 5 c = a//b print “Line 7 – Value of c is “, c When you execute the above program it produces following result: Line 1 – Value of c is 31 Line 2 – Value of c is 11 Line 3 – Value of c is 210 Line 4 – Value of c is 2 Line 5 – Value of c is 1 Line 6 – Value of c is 8 Line 7 – Value of c is 2 |
|
| 118971. |
The plane x = 0 and y = 0 is(a) parallel (b) perpendicular(c) both (A) and (b)(d) none of these |
|
Answer» Answer is (b) perpendicular |
|
| 118972. |
Let N be the set of natural numbers and relation R on N be defined as R = {(x,y):x, y ∈ N and x divides y}. Examine whether R is reflexive, symmetric & transitive. |
|
Answer» Relation R is defined as R = {(x,y) : x, y \(\in\) N and x divides y} Reflexive: Let x \(\in\) N and every natural number divides itself. \(\therefore\) x divides x. ⇒ x R x \(\forall\) x \(\in\) N \(\therefore\) Relation R is reflexive relation. Symmetric: \(\because\) 2 divides 6 i.e., (2, 6) \(\in\) R But 6 does not divide 2 \(\because\) (6, 2) \(\notin\) R Hence, relation R is not symmetric. Transitive: Let x R y, x R z i.e., x divides y & y divides z. Let y = ax & z = by where a & b are arbitary constant such that x divides y & y divides z. ⇒ z = by = b(ax) = ab x \(\therefore\) x divides z. ⇒ x R z. So, R is transitive relation. For reflexive x divides x i.e., x Rx, ∀ x ∈ N R is reflexive For symmetric 2 divides 6 2R6 i.e., (2,6) ∈ R but (6,2) ∈! R as 6 does not divide 2 Also, R is not symmetric For transitive Let x divides y and y divides z i.e., xRy and yRz kj1x = y & k2y = z (k1,k2 are positive integer) k1k2x = k1y = z x divides z xRz So, R is transitive. |
|
| 118973. |
If vector a = 4i + 3j + 2k and vector b = 3i + 2k then find vector|b x 2a| |
|
Answer» We have vector a = 4i + 3j + 2k 2 vector a = 8i + 6j + 4k and vector b = 3i + 2k = 3i + 0j + 2k ∴ vector|b x 2a| = |(i,j,k),(3,0,2),(8,6,4)| = i(0 - 12) - j(12 - 16) + k(18 - 0) = -12i + 4j + 18k ∴ vector|b x 2a| = √(122 + 42 + 182) = √484 = 2√121 = 22 |
|
| 118974. |
If A = [(2,3),(4,5)] and B = [(4,6),(8,10)] then 2A - B = (a) [0](b) [0,0](c) [(0,0),(0,0)](d) [3] |
|
Answer» Answer is (c) [(0,0),(0,0)] |
|
| 118975. |
If y = cos-1 (1 - x2)/(1 + x2) then find dy/dx. |
|
Answer» Putting x = tan θ, we get y = cos-1 (1 - tan2 θ)/(1 + tan2 θ) = cos-1 cos 2 θ = 2θ = 2tan-1 x ∴ dy/dx = 2 x 1/(1 + x2) = 2/(1 + x2) |
|
| 118976. |
If y = ex(sin x + cos x) then show that d2y/dx2 - 2(dy/dx) + 2y = 0 |
|
Answer» y = ex(sin x + cos x) Differentiating w.r.t x, we get dy/dx = ex(d(sin x + cos x)/dx) = ex(cos x - sin x) Again differentiating w.r.t x, we get d2y/dx2 = -ex(sin x - cos x) d2y/dx2 = -2(dy/dx) + 2y = 0 |
|
| 118977. |
If x = cos y = sin(x + y) then find dy/dx. |
|
Answer» Given, x cos y = sin(x + y) Differentiating both sides w.r.t. 'x', we get x(-sin y).(dy/dx) + cos y = cos(x + y)[1 + (dy/dx)] -x sin y.(dy/dx) + cos y = cos(x + y) + cos(x + y).(dy/dx) (dy/dx)[cos(x + y) + x sin y] = cos y - cos(x + y) ∴ dy/dx = (cos y - cos(x + y))/(cos(x + y) + x sin y) |
|
| 118978. |
Explain the following situation by relating force and time. |
|
Answer» When the change in momentum is a constant, the force acting on a body will be inversely proportional to the time taken. As time increase, the force acting decreases and as time decreases, the force acting increases. |
|
| 118979. |
Velocity-time graph of an object of mass 20 g, moving along the surface of a long table is given below.What is the frictional force experienced by the object? |
|
Answer» From the graph Initial velocity u = 20 m/s Final velocity v = 0m/s t = 10 s m = 20 g = 20/100 kg F = ma = \(m\frac{(\text{v}-\text{u})}{t}\) = \(\frac{20}{1000}\times\frac{(0-20)}{10}\) = -0.04 N The negative sign shows that the frictional force is acting opposite to the direction of motion of the object. |
|
| 118980. |
During a pole vault jump, the impact is reduced by falling on a foam bed. |
|
Answer» When the change in momentum is a constant, the force acting on a body will be inversely proportional to the time taken. As time increase, the force acting decreases and as time decreases, the force acting increases. |
|
| 118981. |
It is dangerous for loaded vehicles to negotiate a curve in the road without reducing speed. What is the reason? |
|
Answer» Loaded vehicles possess more inertia of motion. As ” mass increases, inertia also increases. |
|
| 118982. |
Find out the reasons(a) An athlete doing a long jump-start his run from a distance.(b) A running elephant cannot change its direction suddenly. |
|
Answer» (a) This activity helps to cover long distances by utilizing inertia of motion. (b) Mass of elephant is greater. So inertia of motion also be greater. Also, it cannot be able to change its direction suddenly. |
|
| 118983. |
Among the following, which place receives high temperature? A) polar regions B) regions away from the equator C) temperate regions D) regions close to the equator |
|
Answer» D) regions close to the equator |
|
| 118984. |
A measure to decrease global temperature A) Constructing dams B) Growing more trees C) Increasing storage in reservoirs D) Using more vehicles |
|
Answer» B) Growing more trees |
|
| 118985. |
The drought in Vidarbha region has increased during the last few decades. This is an example of A) Weather B) Land water relationshipC) Climate D) Climograph |
|
Answer» Correct option is C) Climate |
|
| 118986. |
Why should one treat Shakespeare, Raphael, Beethoven, etc. important? |
|
Answer» One should treat Shakespeare, Raphael and Beethoven important because they have produced beautiful plays, pictures and music which are helpful in civilization. |
|
| 118987. |
How does Joad describe the lifestyle of Caliphs and Princes in the Arabian Nights ? Were they civilized or not |
|
Answer» Joad thinks that Caliphs and Princes in the Arabian Nights were not civilized because they passed only a luxurious life and did not think new things freely. |
|
| 118988. |
Does the use of machines, trains, wireless, etc., make you civilized ? If not, give reasons. What do machines and cars have to do with being civilized ? |
|
Answer» No, the use of machines, trains, wireless, etc. do not make us civilized because there is nothing to be proud of in having them |
|
| 118989. |
Name all the activities and things which according to Lucy, make one civilized. |
|
Answer» According to Lucy wearing proper clothes, riding in buses and cars and having money to buy things make one civilized. |
|
| 118990. |
Explain the passages with reference to the context : Now, to think freely ………. no civilization. |
|
Answer» Context : In this lesson the author explains the meaning of civilization through a dialogue between himself and a little girl Lucy. He says that in the olden times the priests misguided the people. They asked them to think and to do as they advised them. If they thought or did contrary to them, the gods would be angry. Explanation : In these lines the author explains that thinking freely means thinking differently. But the advice of the priests and the fear of anger of gods prevent a man to think freely. So, for many ages the people followed the priests blindly and did nothing different to their thinking. Hence, there had been no civilization. This type of philosophy checked the way of progress and we could not become civilized. |
|
| 118991. |
Name two heavy metals from industries that pollute water. |
|
Answer» Heavy metals are Lead and Mercury. |
|
| 118992. |
Explain the passages with reference to the context : There are a lot of ………… people to talk to. |
|
Answer» Context : In this lesson the author throws light on some of the factors which are necessary for civilization, e.g. free thinking, security, etc. In the olden days the people were not allowed to think freely. They believed in priests and did what they asked them to do. They were afraid of the anger of gods if they thought differently. So, there could have been no civilization. Explanation : In these lines the author describes another factor security which is also very necessary for civilization. If anybody is afraid of being robbed or murdered, he cannot think freely. Besides this, for thinking freely we must have leisure. If we are busy every time in earning money for food, clothes and house, we shall have no free time and we shall not be able to think new things and to talk to other people. Besides this we should have security of our life and property. Thus civilization consists in having free time, security and society. |
|
| 118993. |
Explain the passages with reference to the context : We should all ….. civilization anyway. |
|
Answer» Context : In this lesson the author explains the meaning of civilization through a dialogue between himself and a little girl Lucy. He concludes that security, leisure and society-all these three things are necessary to free thinking as well as to civilization. Explanation : In these lines the author lays emphasis on peace and security which are the most necessary conditions of civilization. If we go on quarrelling with each other, we shall have no time to think or invent new things. In an atmosphere of fear and insecurity, there is always risk to our life. We shall not be able to progress and prosper. |
|
| 118994. |
Mention any two sources of water pollution. |
|
Answer» Two sources of water pollution are :
|
|
| 118995. |
What are natural sources of air pollution ? |
|
Answer» Natural sources are volcanic eruptions, sand, dust, forest fires etc. |
|
| 118996. |
Explain the passages with reference to the context : But it is certainly…… other things as well. |
|
Answer» Context: In this lesson the author explains the meaning of civilization through a dialogue between himself and a little girl Lucy. He comes to the conclusion that security, leisure and society-all these three things are necessary to free thinking as well as to civilization. In an atmosphere of fear and insecurity, there is always risk to our life and we shall not be able to make progress. Explanation : In these lines the author makes it clear that civilization is a very wide term. Only to have the rules and to follow them does not make a man civilized. Civilization means to be good. If we want to be good or civilized, we should behave our neighbours in a good manner, we should respect his property and we should follow the rules sincerely. So, all these things make us civilized. |
|
| 118997. |
Name three gases emitted during burning of garbage. |
|
Answer» These are Carbon dioxide, Sulphur dioxide, Nitrogen oxides. |
|
| 118998. |
What is known as smog ? What harm is done by smog especially in winter ? |
|
Answer» Smog means smoke + fog. In winter season smog is responsible for many accidents due to the obstacle in visibility. |
|
| 118999. |
What happens when fossil fuels are burnt ? |
|
Answer» When fossil fuels are burnt they cause air pollution. Greenhouse gases are formed and acid rain may also fall. |
|
| 119000. |
What are the various uses of wood ? |
|
Answer» The wood is one of the most important resources, as it provides timber for houses, construction, fuel for household and industrial purposes, transport lines, agricultural implements, furniture, sports goods, stationery and various consumer goods. |
|