LogoLearning For Everyone
Take Quiz
Contact Us
Related Topics
Related Topics
Selected Topic: All
1. Is Python case sensitive when dealing with identifiers?
Choose the correct option:
  • a) yes

  • b) no

  • c) machine dependent

  • d) none of the mentioned

Case is always significant while dealing with identifiers in python.

objective is to make sure x has a integer value, select all that apply (python 3.xx)
Choose the correct option:
  • a) x = 13 // 2

  • b) x = int(13 / 2)

  • c) x = 13 % 2

  • d) All of the mentioned

// is integer operation in python 3.0 and int(..) is a type cast operator.

9. Which of the following Boolean expressions is not logically equivalent to the other three?
Choose the correct option:
  • a) not(-6<0 or-6>10)

  • b) -6>=0 and -6<=10

  • c) not(-6<10 or-6==10)

  • d) not(-6>10 or-6==10)

The expression not(-6&lt;0 or -6&gt;10) returns the output False.

3. The formatting method {1:<10} represents the ___________ positional argument, _________ justified in a 10 character wide field.
Choose the correct option:
  • a) first, right

  • b) second, left

  • c) first, left

  • d) second, right

The formatting method {1:&lt;10} represents the second positional argument, left justified in a 10 character wide field.

5. What arithmetic operators cannot be used with strings?
Choose the correct option:
  • a) +

  • b) *

  • c) –

  • d) All of the mentioned

+ is used to concatenate and * is used to multiply strings.

Items per page: