Quick check
What will the following code print? print('Hello, World!')
Which of the following is a correct way to declare a variable in Python?
What function is used to get input from the user?
What is the output of the following code? x = 5 y = 10 if x > y: print("x is greater than y") else: print("x is less than or equal to y")
Which of the following is an example of a list in Python?
What will the following code snippet do? my_list = [1, 2, 3] my_list.append(4) print(my_list)
Which statement correctly uses a loop to print numbers 0 to 9?
What does the following code do? for i in range(3): print(i)
How do you define a function in Python?
What will the following code output? def greet(name): return "Hello, " + name print(greet("Alice"))
Which of the following is NOT a valid way to create a string in Python?
What is the result of 3 * 'abc'?
Which of the following is used to comment out multiple lines in Python?
What is the output of the following code? x = 5 print(x > 3 and x < 10)
Which of the following is used to remove an item from a list by its index?
What is the output of the following code? print(2 ** 3)
Which of the following is used to format strings in Python?
What is the result of 10 / 3 in Python 3?
Which of the following is used to get the length of a list?
What is the output of the following code? print(bool(0), bool(1), bool(""))