NEW
Font size
WorksheetsHomework 3- Python
Total questions: 10
Worksheet time: 5mins
What is the data type of the value `42` in Python?
String
Integer
Float
Boolean
Which of the following is a valid variable name in Python?
1st_variable
firstVariable
first-variable
first variable
What is the output of the following code snippet? ```python print(type("Hello")) ```
`
`
`
`
Which of the following is a built-in function in Python?
`calculate()`
`print()`
`add()`
`total()`
What data type would 2.7 be defined?
Integer
Float
String
Boolean
Which of the following is a correct way to import a module in Python?
`import math`
`include math`
`require math`
`use math`
What is the result of the following expression in Python: `5 + 3 * 2`?
16
11
13
10
Which of the following is used to create a comment in Python?
`// This is a comment`
`# This is a comment`
`/* This is a comment */`
``
Which of the following is used to define a block of code in Python?
Curly braces `{}`
Square brackets `[]`
Indentation
Parentheses `()`
Which of the following functions is used to get the length of a list in Python?
size()
length()
len()
count()
