1) Which symbol is used for “not equal to” in Python? a) == b) != c) <= d) >= 2) What will this code print? a) True b) False c) Error d) Nothing 3) Which of these is a valid variable name in Python? a) 2value b) first-name c) first_name d) first name 4) What happens if you forget the colon : in an if statement? a) Python ignores it b) It runs anyway c) SyntaxError d) Nothing happens 5) What does this expression evaluate to? a) True b) False c) Yes d) No 6) What is the default data type of input() in Python? a) String b) Integer c) Float d) Bool 7) Which keyword is used to add an alternative condition in Python? a) else b) else if c) elif d) elseif 8) What is the correct way to write a single-line comment in Python? a) // This is a comment b) /* This is a comment */ c) ''' This is a comment d) # This is a comment 9) What will the following code output? a) 8 b) 53 c) 5 + 3 d) "5 + 3" 10) What is the output of this code? a) A b) B c) C d) Nothing

Leaderboard

Visual style

Options

Switch template

Continue editing: ?