NEW
Font size
Worksheets1st Embedded & Ai T
Total questions: 25
Worksheet time: 13mins
What is Python?
How do you print something in Python?
What symbol is used to assign a value to a variable in Python?
What function is used to get input from the user in Python?
How do you create a list in Python?
What is the output of print(2 + 3)?
What does len() function do?
Which keyword is used to define a function in Python?
How do you create an empty dictionary in Python?
What is the result of 5 // 2?
What does the range() function return?
What is the output of print("Hello" + "World")?
What does break do in a loop?
What is the result of 3 ** 2?
What is the result of 5 % 2?
How do you convert a string to an integer in Python?
Which of the following is immutable in Python?
What is a list comprehension in Python?
A way to create lists using a for loop in a single line.
A method to convert lists to strings.
A function to sort lists in Python.
A type of data structure similar to arrays.
What is the purpose of the 'pass' statement in Python?
To exit a loop
To create an empty function or class
To skip the current iteration
To raise an exception
How do you check the type of a variable in Python?
type(variable)
checktype(variable)
var_type(variable)
typeof(variable)
What is the output of print("Hello" * 3)?
HelloHelloHello
Hello 3
3 Hello
HelloHello Hello
Which of the following is a valid way to import a module in Python?
import module_name
include module_name
require module_name
using module_name
What is the output of print(10 - 4)?
6
4
10
14
Which of the following is used to create a class in Python?
class
def
create
function
What does the 'continue' statement do in a loop?
Exits the loop immediately.
Skips the current iteration and continues with the next one.
Pauses the loop temporarily.
Ends the program.
