Questions

M.C.Q [1M]

🎯

Test yourself on this topic

16 questions · timed · auto-graded

MCQ 11 Mark
Which of the following lines will give error?
  • A
    print ("22"+"2")
  • B
    print("12"+2)
  • C
    print(3+"22")
  • both b. and c.
Answer
Correct option: D.
both b. and c.
D
View full question & answer
MCQ 21 Mark
Which of the following is the name of a function that displays in output screen?
  • A
    disp
  • B
    display
  • print
  • D
    printall
Answer
Correct option: C.
print
C
View full question & answer
MCQ 31 Mark
Assume that a list ttsl exists. What does the below line display?
print (ttsl[::-1])
  • A
    The whole of the array
  • B
    The array starting with first element, and alternating
  • The reverse of the array
  • D
    None of these
Answer
Correct option: C.
The reverse of the array
C
View full question & answer
MCQ 51 Mark
Which of the following is a function in Python?
  • range()
  • B
    chomp()
  • C
    newline()
  • D
    delta()
Answer
Correct option: A.
range()
A
View full question & answer
MCQ 71 Mark
Which of the following is NOT the name of a type of loop in Python?
  • A
    for
  • B
    while
  • repeat
  • D
    None of these
Answer
Correct option: C.
repeat
C
View full question & answer
MCQ 81 Mark
Which of the following is output due to the below line?
print ("2" + "2")
  • A
    4
  • 22
  • C
    222
  • D
    10
Answer
Correct option: B.
22
B
View full question & answer
MCQ 91 Mark
What does elif signify in Python?
  • A
    A part of conditional use in Python
  • B
    A function
  • C
    A keyword in Python
  • Both a. and c.
Answer
Correct option: D.
Both a. and c.
D
View full question & answer
MCQ 101 Mark
Python, in computer world, refers to:
  • A
    A type of website
  • B
    A type of email client
  • A programming language
  • D
    A type of laptop
Answer
Correct option: C.
A programming language
C
View full question & answer
MCQ 111 Mark
What will the output of the following expression in the Python shell be?
2 ** 3 ** 2
  • A
    256
  • B
    64
  • C
    512
  • D
    128
Answer
self
View full question & answer
MCQ 121 Mark
If the length of the string, stored in a, is 5, what is the output of the following line?
print (len(a + a))
  • A
    Gives an error
  • B
    8
  • C
    10
  • D
    12
Answer
self
View full question & answer
MCQ 131 Mark
If the values of a and b are of string data type, which of the following has meaning?
  • A
    a/b
  • B
    b-a
  • C
    a-b
  • D
    a+b
Answer
self
View full question & answer