Complete Solutions
What is the correct way to declare a variable in Python?
A) `var x = 10`
B) `int x = 10`
✔✔C) `x = 10`
D) `declare x = 10`
Which of the following is a valid string in Python?
A) `"Hello"`
✔✔B) `'World'`
C) `Hello`
D) `World`
What is the result of `10 // 3` in Python?
A) `3.33`
✔✔B) `3`
C) `4`
1
,D) `30`
Which operator is used to check equality in Python?
A) `=`
B) `!=`
✔✔C) `==`
D) `>=`
What is the output of `5 + 2 * 3`?
A) `21`
✔✔B) `11`
C) `16`
D) `7`
What is the correct syntax to create a list in Python?
✔✔A) `[1, 2, 3]`
B) `(1, 2, 3)`
C) `{1, 2, 3}`
2
, D) `list(1, 2, 3)`
Which data type is used to represent true or false values?
A) `Integer`
✔✔B) `Boolean`
C) `String`
D) `Float`
What is the result of `5 % 2` in Python?
A) `2.5`
B) `1.5`
✔✔C) `1`
D) `0`
How do you write a comment in Python?
✔✔A) `# This is a comment`
B) `// This is a comment`
C) `/* This is a comment */`
3