Podcast
Questions and Answers
Which of the following is NOT a valid variable name in Python?
Which of the following is NOT a valid variable name in Python?
- 123abc
- abc123
- @abc (correct)
- _abc
What is the data type of the variable x
if x = 5.7
?
What is the data type of the variable x
if x = 5.7
?
- int
- float (correct)
- boolean
- string
Which data type cannot be used in mathematical operations in Python?
Which data type cannot be used in mathematical operations in Python?
- int
- float
- boolean
- string (correct)
What is the result of the following code snippet in Python:
x = 5 y = str(x)
What is the result of the following code snippet in Python:
x = 5 y = str(x)
What is the output of the following code snippet in Python:
x = 'Hello' y = 'World' result = x + y print(result)
What is the output of the following code snippet in Python:
x = 'Hello' y = 'World' result = x + y print(result)