Questions

5 Marks Each

🎯

Test yourself on this topic

3 questions · timed · auto-graded

Question 15 Marks
Pawan is confused in understanding Dictionary concept. Help him to understand the concept by choosing the appropriate answer. (a) Which statement will display Not Available?
(i)Statement 9 (ii)Statement 10 (iii)Statement 11(iv)Statement 13
(b) Choose the key from Dictionary.
(i)ADMNO (ii)‘admno’ (iii)101 (iv)“Not Available”
(c) Which statement will display None?
(i)Statement 9 (ii)Statement 10 (iii)Statement 11(iv)Statement 13
(d) Which Statement will display Tejas?
(i) Statement 8 (ii) Statement 9 (iii) Statement 10 (iv) Statement 11
(e) Choose the identifier.
(i) ADMNO (ii) ‘admno’ (iii) setdefault (iv)Not Available
Answer
(a) (iii) Statement 11, (b) (ii) ‘admno’, (c) (iv) Statement 13, (d) (ii) Statement 9, (e) (i) ADMNO
View full question & answer
Question 25 Marks
The Teacher wrote the following code. Sanya was absent on the day when the topic was taught. Help her to complete the assignment. Choose the output on the basis of the above code.
(a) Which statement is used to display “HeLLo PyThon”?
(i) Statement 1 (ii) Statement 12
(iii)Statement 13 (iv) No Statement will display.
(b) Which statement will check for capital letters?
(i) Statement 6 (ii) Statement 7
(iii) Statement 8 (iv) Statement 9
(c) Which statement will convert it into capital letters?
(i) Statement 6 (ii) Statement 7
(iii) Statement 8 (iv) Statement 9
(d) Which is iterative Statement?
(i) Statement 5 (ii) Statement 6
(iii) Statement 8 (iv)There is No iterative Statement.
(e) What will be the output of Python code (Statement 1 to Statement 13)
(i) HeLLo PyThon (ii) No Output
(iii) hEllO pYtHON (iv) Hello Python
Answer
(a) (ii) Statement 12 , (b) (i) Statement 6 (c) (iv) Statement 9 , (d) (i) Statement 5 (e) (iii) hEllO pYtHON
View full question & answer
Question 35 Marks
Choose the correct option.

(a) What is String data-type in Python?

(i)It is written in double quotes only.

(ii)Its value can be changed.

(iii)It is enclosed in square brackets.

(iv)It is immutable data-type.

(b) Ms. Ragini is confused on the way to compare the strings. Help her in choosing the correct statement.

(i)equal() (ii)equals() (iii) == (iv)compare()

(c) Tejas is confused in the output of the following code. Help him to choose the correct option.

age = 12

txt = "My name is Tejas, I am " , age

print(txt)

(i)('My name is Tejas, I am ', 12)

(ii)My name is Tejas, and I am 12

(iii)(My name is Tejas, I am , 12)

(iv)[My name is Tejas, I am , 12]

(d) Help mini to choose the correct output of the following Python code.

rollno = 3

name = "Mini"

Average = 88.76

Txt = "My name is {1}, having roll no {0} and scored {2} percent."

print(Txt.format(rollno, name, Average))

(i)My name is ‘Mini’, having roll no 3 and scored 88.76 percent.

(ii)My name is Mini, having roll no 3 and scored 88.76 percent.

(iii)‘My name is Mini, having roll no 3 and scored 88.76 percent.’

(iv)(My name is Mini, having roll no 3 and scored 88.76 percent.)

(e) Help Gurnika to choose the correct option for the following Python code.

b = "Hello, World!"

print(b[-5:2])

(i)Hello, World! (ii)orl (iii) Error (iv) No Output

Answer
(a) (iv) It is immutable data-type.
(b) (iii) ==
(c) (i) ('My name is Tejas, I am ', 12)
(d) (ii) My name is Mini, having roll no 3 and scored 88.76 percent.
(e) (iv) No Output.
View full question & answer
5 Marks Each - Computer Science STD 12 Humanities Questions - Vidyadip