12th Computer Science Chapter- 8 Onemarks Online Test

Question 1: Which of the following is the output of the following python code?
  str1="TamilNadu"
  print(str1[::-1])
A) Tamilnadu
B) Tmlau
C) udanlimaT
D) udaNlimaT
Question 2: What will be the output of the following code?
  str1="Chennai Schools"
  str1[7]='-'
A) Chennai-Schools
B) Chenna-School
C) Type error
D) Chennai
Question 3: Which of the following operator is used for concatenation?
A) +
B) &
C) *
D) =
Question 4: Defining strings within triple quotes allows creating:
A) Single line string
B) Double line string
C) Multi line string
D) Multiple string
Question 5: Strings in python:
A) Changeable
B) Mutable
C) Immutable
D) Flexible
Question 6: Which of the following is the slicing operator?
A) { }
B) [ ]
C) < >
D) ( )
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
Question 8: Which of the following formatting character is used to print exponential notations in upper case?
A)%f
B) %E
C) %g
D)%n
Question 9: Which of the following is used as placeholders or replacement fields which get replaced along with format() function?
A) { }
B) < >
C) ++
D) ^^
Question 10: The subscript of a string may be:
A) Positive
B) Negative
C) Both a and b
D) either a or b

Report Card

Total Questions Attempted: 0

Correct Answers: 0

Wrong Answers: 0

Percentage: 0%

Post a Comment

0 Comments