Explore topic-wise InterviewSolutions in .

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.

13451.

Explain input ( ) and print ( ) functions with examples?

Answer»

Input and Output Functions:

A program needs to interact with the user to accomplish the desired task; this can be achieved using Input – Output functions. The input ( ) function helps to enter data at run time by the user and the output function print ( ) is used to display the result of the program on the screen after execution. 

The print ( ) function 

In Python, the print Q function is used to display result on the screen. 

The syntax for print Q is as follows:

Example

print (“string to be displayed as output ”)

print (variable)

print (“String to be displayed as output ” , variable) 

print (“String1 ” , variable, “String 2” , variable, “String 3”)

Example

>>> print (“Welcome to Python Programming”) 

Welcome to Python Programming

>>> x = 5

>>> y = 6

>>> z = x + y

>>> print (z)

11

>>> print (“The sum = ” , z)

The sum = 11

>>> print (“The sum of” , x, “and” , y, “is” , z)

The sum of 5 and 6 is 11

The print ( ) evaluates the expression before printing it on the monitor. The print ( ) displays an entire statement which is specified within print ( ). Comma ( ,) is used as a separator in print ( ) to print more than one item.

input ( ) function

In Python, input ( ) function is used to accept data as input at run time. The syntax for input ( ) function is,

Variable = input (“prompt string”)

Where, prompt string in the syntax is a statement or message to the user, to know what input can be given. 

If a prompt string is used, it is displayed on the monitor; the user can provide expected data from the input device. The input ( ) takes whatever is typed from the keyboard and stores the entered data in the given variable. If prompt string is not given in input ( ) no message is displayed on the screen, thus, the user will not know what is to be typed as input.

Example 1:

input ( ) with prompt string

>>> city = input (“Enter Your City: ”)

Enter Your City: Madurai

>>> print (“I am from “ , city)

I am from Madurai

Example 2:

input ( ) without prompt string

>>> city = input ( ) 

Rajarajan

>>> print (I am from” , city)

I am from Rajarajan

Note that in example – 2, the input ( ) is not having any prompt string, thus the user will not know what is to be typed as input. If the user inputs irrelevant data as given in the above example, then the output will be unexpected. So, to make your program more interactive, provide prompt string with input ( ). 

The input ( ) accepts all data as string or characters but not as numbers. If a numerical value is entered, the input values should be explicitly converted into numeric data type. The int ( ) function is used to convert string data as integer data explicitly. We will leam about more such functions in later chapters.

Example 3:

x = int (input(“Enter Number 1: ”))

y = int (input(“Enter Number 2: ”))

print (“The sum = ” , x + y)

Output:

Enter Number 1:34

Enter Number 2:56

The sum = 90

Example 4:

Alternate method for the above program

x, y = int (input(“Enter Number 1 :”)), int(input(“Enter Number 2:”))

print (”X = “ ,x, ”Y = “ ,y)

Output:

Enter Number 1:30

Enter Number 2:50

X = 30 Y= 50

13452.

Multiline string literal is given by …………

Answer»

“‘ “‘ triple quotes

13453.

Question 33. Fe reacts with dilute nitric acid in cold condition to give ..............(a) Ferrous nitride (b) Ferrous nitrate (c) Ferric nitride (d) Ferric nitrate

Answer»

(b) Ferrous nitrate

13454.

Python breaks each logical line into a sequence of elementary lexical components called ………

Answer»

Python breaks each logical line into a sequence of elementary lexical components called Tokens

13455.

What are the key features of python?

Answer»

Key features of Python:

It is a general purpose programming language which can be used for both scientific and non – scientific programming.

It is a platform independent programming language. The programs written in Python are easily readable and understandable

13456.

Write note on keywords. Give examples?

Answer»

Keywords are special words used by Python interpreter to recognize the structure of program. As these words have specific meaning for interpreter, they cannot be used for any other purpose. Eg, While, if.

13457.

Which one of the following statement is wrong?(a) Octal Integer uses upper and lower case O(b) Hexadecimal Integer uses upper and lower case OX(c) Long integer uses upper and lower case 1.

Answer»

(c) Long integer uses upper and lower case 1.

13458.

Find the hexadecimal Integer.(a) 0102(b) 0876(c) 0432(d) 0X102

Answer»

Answer is (d) 0X102

13459.

Write a short note on comments?

Answer»

Comments in Python

In Python, comments begin with hash symbol (#). The lines that begins with # are considered as comments and ignored by the Python interpreter. Comments may be single line or no multi – lines. The multiline comments should be enclosed within a set of # as given below.

# It is Single line Comment

# It is multiline comment

which contains more than one line #

13460.

Match the following1. // – (i) Modulus2. # – (ii) Floor division3. % – (iii) Strings4. ||| ||| – (iv) Comments(a) 1 – (ii), 2 – (iv), 3 – (i), 4 – (iii)(b) 1 – (i), 2 – (ii), 3 – (iii), 4 – (iv)(c) 1 – (iv), 2 – (ii), 3 – (i), 4 – (iii)(d) 1 – (iv), 2 – (i), 3 – (iii), 4 – (ii)

Answer»

(a) 1 – (ii), 2 – (iv), 3 – (i), 4 – (iii)

13461.

What is the another name for fundamental data type? (a) Class (b) Built – in (c) Type def (d) User defined

Answer»

(b) Built – in

13462.

How many floating point values are there in a complex number?(a) 1(b) 2(c) 3(d) 4

Answer»

There are 2 floating point values in a complex number

13463.

Give any 6 keywords in Python?

Answer»

false, class, none, continue, finally, return, is

13464.

Mention some rules for Identifiers?

Answer»

1. An identifier must start with an alphabet (A..Z or a..z) or underscore (_).

2. Identifiers may contain digits (0 .. 9) 

3. Python identifiers are case sensitive i.e. uppercase and lowercase letters are distinct.

4. Identifiers must not be a python keyword.

5. Python does not allow punctuation character such as %,$, @ etc., within identifiers.

13465.

Give an example for input with and without prompt string?

Answer»

Example 1:

input ( ) with prompt string

>>> city = input (“Enter Your City: ”)

Enter Your City: Madurai

Example 2:

input ( ) without prompt string

>>> city = input ( )

Rajarajan

13466.

Explain the Syntax of input ( ) function?

Answer»

The syntax for inputQ function is,

Variable = input (“prompt string”)

Where, prompt string in the syntax is a statement or message to the user, to know what input can be given.

If a prompt string is used, it is displayed on the monitor; the user can provide expected data from the input device. The input) ) takes whatever is typed from the keyboard and stores the entered data in the given variable. If prompt string is not given in input() no message is displayed on the screen

13467.

Give the syntax for print ( ) function?

Answer»

The syntax for print ( ) is as follows:

Example:

print (“string to be displayed as output ” )

print (variable)

print (“String to be displayed as output ” , variable) 

print (“String 1 ” , variable, “String 2” , variable, “String 3”)

13468.

Pick the odd one out.Identifiers, Keywords, Delimiters, Comments, Literals

Answer»

Answer is Comments

13469.

…………… are used to indicate blocks of codes in python. (a) Whitespaces(b) { }(c) [ ](d) < >

Answer»

(a) Whitespaces

13470.

The metal used in electroplating is ........... (a) Cu (b) Al (c) Fe(d) Co

Answer»

The metal used in electroplating is Cu

13471.

Matte is a mixture of: (a) Cu2O + Cu2S (b) Cu2O + FeS (c) Cu2S + FeS (d) Cu2O + PbS

Answer»

(c) Cu2S + FeS

13472.

………. metal can be cut with knife. (a) Potassium (b) Gallium (c) Mercury (d) Gold

Answer»

(a) Potassium

13473.

Electrolyte used in Hall’s process ...... (a) Pure alumina + molten cryolite + fluorspar (b) Pure alumina + molten bauxite + fluorspar (c) Pure bauxite + molten cryolite + fluorspar (d) Pure bauxite + molten Haematite + fluorspar.

Answer»

(a) Pure alumina + molten cryolite + fluorspar

13474.

Three elements A, B and C are having the electronic configuration Is2 2s1 , Is2 2s2 and Is2 2s2 2p1 respectively. Which element will have the lowest ionization energy? (a) A (b) B (c) C (d) B and C

Answer»

A have the lowest ionization energy

13475.

The process of coating the surface of the metal with a thin layer of zinc is called ......... (a) painting (b) thinning (c) galvanization (d) electroplating

Answer»

(c) galvanization

13476.

The highly metallic element will have the configuration of: (a) 2, 8, 7 (b) 2, 8, 8, 5 (c) 2, 8, 8, 1 (d) 2, 8, 2

Answer»

(c)  2, 8, 8, 1

13477.

Comments are of ……… or …… lines.

Answer»

Single, multi

13478.

The flux which is used when the gangue present in the ore is acidic: (a) Silica (b) Calcium oxide (c) Calcium silicate (d) Cuprous sulphide

Answer»

(b) Calcium oxide

13479.

Assertion: Bauxite is purified by leaching. Reason: Bauxite undergoes thermal decomposition. (a) Assertion and Reason are correct, Reason explains the Assertion. (b) Assertion is correct, Reason is wrong. (c) Assertion is wrong, Reason is correct. (d) Assertion and Reason are correct, Reason doesn’t explains Assertion.

Answer»

(b) Assertion is correct, Reason is wrong.

13480.

Conversion of bauxite into alumina is .......... (a) Hall’s process (b) Alumino thermic process (c) Baeyer’s process (d) Bessemerisation process.

Answer»

(c) Baeyer’s process

13481.

………. is not a good conductor of heat and electricity. (a) Silver (b) Tungsten (c) Copper (d) Aluminium

Answer»

Tungsten is not a good conductor of heat and electricity. 

13482.

Explain the Baeyer’s process of conversion of Bauxite into alumina.

Answer»

(i) Bauxite ore is finely ground and heated under pressure with a solution of concentrated caustic soda solution at 150°C to obtain sodium meta aluminate. 

(ii) On diluting sodium meta aluminate with water, a precipitate of aluminium hydroxide is formed.

(iii) The precipitate is filtered, washed, dried and ignited at 1000°C to get alumina.

2Al(OH)3 + 1000°C ⟶ Al2O3 + 3H2O

13483.

Along with cryolite and alumina, another substance is added to the electrolyte mixture. Name the substance and give one reason for the addition.

Answer»

CaF2 (Fluorspar) is added along with cryolite and alumina. It is added to reduce the high melting point of the electrolyte.

13484.

Assertion: An uncleaned copper vessel is covered with greenish layer. Reason: copper is not attacked by alkali. (a) Assertion and Reason are correct, Reason explains the Assertion. (b) Assertion is correct, Reason is wrong. (c) Assertion is wrong, Reason is correct.(d) Assertion and Reason are correct, Reason doesn’t explains Assertion.

Answer»

(d) Assertion and Reason are correct, Reason doesn’t explains Assertion.

13485.

Explain the method of making alloys.

Answer»
  • By fusing the metals together. 

E.g. Brass is made by melting zinc and copper. 

  • By compressing finely divided metals. 

E.g. Wood metal: an alloy of lead, tin, bismuth and cadmium powder is a fusible alloy.

13486.

Assertion: To design the body of an aircraft, aluminium alloys are used. Reason: Aluminium becomes passive when it is treated with dil or con.HNO3 (a) Assertion and Reason are correct, Reason explains the Assertion. (b) Assertion is correct, Reason is wrong. (c) Assertion is wrong, Reason is correct. (d) Assertion and Reason are correct, Reason doesn’t explains Assertion.

Answer»

(d) Assertion and Reason are correct, Reason doesn’t explains Assertion.

13487.

State the reason for addition of caustic alkali to bauxite ore during purification of bauxite.

Answer»

Caustic alkali is added to bauxite, to dissolve bauxite ore and obtain a solution of sodium aluminate.

13488.

Assertion: Magnesium is used to protect steel from rusting. Reason: Magnesium is more reactive than iron. (a) Assertion and Reason are correct, Reason explains the Assertion. (b) Assertion is correct, Reason is wrong. (c) Assertion is wrong, Reason is correct. (d) Assertion and Reason are correct, Reason doesn’t explains Assertion.

Answer»

(a) Assertion and Reason are correct, Reason explains the Assertion.

13489.

Fill in the blanks:1. Galena is the ore of ………2. The silvery white metal which is a good conductor of heat and electricity is ……3. The slag formed during Bessemerisation process is ………4. Blister copper contains ………. percentage of copper.5. Haematite ore is concentrated by ……….. washing.

Answer»

1. lead

2. aluminium

3. Iron silicate or FeSiO3

4. 98%

5. hydraulic

13490.

Explain the smelting process.

Answer»

The roasted ore of copper is mixed with powdered coke and sand and is heated in a blast furnace to obtain matte (Cu2S + FeS) and slag. The slag is removed as waste. 

2 FeS + 3O2 → 2 FeO + 2 SO2 

2 Cu2S + 3O2 → 2 Cu2O + 2SO2 

Cu2O + FeS → Cu2S + FeO

FeO + SiO2 → FeSiO2 (slag)

13491.

Why are the alloys prepared?

Answer»

1. To modify appearance and colour. 

2. To modify chemical activity. 

3. To lower the melting point.

4. To increase hardness and tensile strength. 

5. To increase resistance to electricity

13492.

A is a silvery white metal. A combines with O2 to form B at 800°C, the alloy of A is used in making the aircraft. Find A and B.

Answer»

A – Silvery white metal – Aluminium 

4 Al + 3O2 ⟶ 2Al2O3(B) (Aluminium oxide)

The alloys of aluminium, Duralumin and Magnalium are used in making the aircraft. 

A – Aluminium; B – Aluminium oxide.

13493.

State two conditions necessary for rusting of iron.

Answer»

(i) The presence of water and oxygen is essential for the rusting of iron. 

(ii) Impurities in the iron, the presence of water vapour, acids, salts and CO2 speeds up rusting.

13494.

Which is known as Wet corrosion or Electrochemical corrosion?

Answer»

The corrosive action in the presence of moisture is called wet corrosion. It occurs as a result of electrochemical reaction of metal with water or aqueous solution of salt or acids or bases.

13495.

Define corrosion.

Answer»

Corrosion is the gradual destruction of metals by chemical or electrochemical reaction with the environment.

13496.

Write a note on Cathodic protection.

Answer»

It is the method of controlling corrosion of a metal surface protected is coated with the metal which is easily corrodible. The easily corrodible metal is called Sacrificial metal to act as anode ensuring cathodic protection.

13497.

True or false. (If false give the correct statement) 1. Alkali metals are generally extracted by the electrolysis of their ores in fused state. 2. Every mineral is an ore but every ore is not a mineral. 3. Slag is a product formed during smelting by combination of flux and impurities. 4. Reactive metals occur in native state. 5. Malachite is a sulphide ore of copper. 6. Lanthanides are present in the 6th group of the periodic table. 7. Atomic radius increases as we go across the period due to increase in size.8. As the positive charge increases, the size of the cation decreases. 9. If the difference in electronegativity is greater than 1.7, the bond is considered to be covalent. 10. Siderite is the carbonate ore of calcium.

Answer»

1.True

2. True 

3. True 

4. False – Reactive metals always occur in the combined state. 

5. False – Malachite is the carbonate ore of copper. 

6. False – Lanthanides are present in the 6th period of the periodic table. 

7. False – Atomic radius increases as we go across the period due to decrease in size. 

8. True 

9. False – If the difference in electronegativity is greater than 1.7, the bond is considered to be ionic. 

10. False – Siderite is the carbonate ore of Iron.

13498.

Write a note about smelting.

Answer»

Smelting is a process of reducing the roasted metallic oxide to metal in a molten condition. In this process, impurities are removed by the addition of flux as slag.

13499.

Write the name and formula of the ores of iron.

Answer»
Ores of IronFormula
HaematiteFe2O3
MagnetiteFe3O4
Iron PyriteFeS2
13500.

How is rust formed?

Answer»

When iron is exposed to moist air, it forms a layer of brown hydrated Ferric oxide on its surface. This compound is known as rust. 

4Fe + 3O2 + xH2O → 2Fe2O3 . xH2O (Rust)