Game Preview

Test- Python Variables

  •  English    9     Public
    Test
  •   Study   Slideshow
  • hero1 = "Batman" hero2 = "Batman" print(hero1 == hero2)
    Output: True
  •  15
  • Which of the following is a valid variable name in Python? A) 2cool4school B) my_variable C) break D) my-variable
    my_variable
  •  15
  • x = 10 y = 5 print(x + y) A) 15 B) 105 C) 5 D) 10
    15
  •  15
  • Which operator is used to check both conditions are True?A) or B) and C) not D) =
    B) and
  •  15
  • a = "Python" b = "python" print(a == b) A) True B) False C) Error D) None
    False
  •  15
  • x = 8 y = 3 print(x % y) A) 2 B) 1 C) 3 D) 8
    2
  •  15
  • Which of these is a Boolean value? A) 1 B) "True" C) False D) 0
    C) False
  •  15
  • Which of the following is NOT a valid operator in Python? A) and B) or C) not D) but
    11)but
  •  15
  • score = 50 score += 10 print(score) A) 10 B) 50 C) 60 D) Error
    C) 60
  •  15