100% Correct
What is the correct way to declare a string variable in Python?
✔✔ `my_string = "Hello"`
What is the syntax for creating a list in Python?
✔✔ `my_list = [1, 2, 3]`
How can you print the value of a variable in Python?
✔✔ `print(variable_name)`
How do you create an empty dictionary in Python?
✔✔ `my_dict = {}`
What is the proper way to assign a value to a variable in Python?
✔✔ `variable_name = value`
1
, How do you check the type of a variable in Python?
✔✔ `type(variable_name)`
What is the syntax for a while loop in Python?
✔✔ `while condition:`
How do you write a comment in Python?
✔✔ `# This is a comment`
What is the correct syntax for importing a module in Python?
✔✔ `import module_name`
How do you define a class in Python?
✔✔ `class MyClass:`
What is the syntax for defining a method inside a class in Python?
✔✔ `def my_method(self):`
2