Sail E0 Webinar

MCQs

Total Questions : 50 | Page 4 of 5 pages
Question 31. Which two statements are used to implement iteration?
  1.    IF and WHILE
  2.    ELSE and WHILE
  3.    FOR and WHILE
  4.    IF and ELSE
 Discuss Question
Answer: Option C. -> FOR and WHILE
Question 32. What would print (10 + 16) produce?
  1.    20
  2.    22
  3.    24
  4.    26
 Discuss Question
Answer: Option D. -> 26
Question 33. What is the value of the expression 100 / 25?
  1.    4
  2.    4.0
  3.    "4.0"
  4.    '4.0'
 Discuss Question
Answer: Option B. -> 4.0
Question 34. To insert an the string "strawberries" in the first position of a list we use
  1.    fruit.append("strawberries, 1")
  2.    fruit.insert("strawberries",0)
  3.    fruit.insert(1, "strawberries")
  4.    fruit.insert(0, "strawberries")
 Discuss Question
Answer: Option D. -> fruit.insert(0, "strawberries")
Question 35. The condition for a while loop to continue could include which of the following?
  1.    While something equals something
  2.    While something is greater than something
  3.    While something is True
  4.    All of these
 Discuss Question
Answer: Option D. -> All of these
Question 36. Which is the most appropriate data type for: "13th December"
  1.    Float
  2.    Boolean
  3.    Integer
  4.    String
 Discuss Question
Answer: Option D. -> String
Question 37. What is the output of the following code :print 9//2
  1.    4.5
  2.    4.0
  3.    4
  4.    3
 Discuss Question
Answer: Option C. -> 4
Question 38. What will the output be from the following code?print("Hello world!\nHello world!")
  1.    Hello world! Hello world!
  2.    Hello world!Hello world!
  3.    SyntaxError
  4.    Hello world!
 Discuss Question
Answer: Option B. -> Hello world!Hello world!
Question 39. Why do we learn Python?
  1.    It's a really big snake
  2.    It's the name of a very funny comedy show
  3.    It's simple and easy to learn
  4.    It's so rare that no one else knows it
 Discuss Question
Answer: Option C. -> It's simple and easy to learn
Question 40. Which python operator means 'less than or equal to'?
  1.    >=
  2.    >
  3.    
 Discuss Question
Answer: Option D. -> It's simple and easy to learn

Latest Videos

Latest Test Papers