Update with Verified Solutions
What will the following code print?
```python
x=7
y = 10
print(x + y)
```
✔✔ The output will be `17` because `x + y` equals 7 + 10.
How do you check if a number is even in Python?
✔✔ You can check if a number is even by using the modulus operator, `number % 2 == 0`.
What will the following code print?
```python
for i in range(3):
1
, print(i)
```
✔✔ The output will be `0`, `1`, `2` because the loop iterates over the range from 0 to 2.
How do you create a list in Python?
✔✔ A list is created by enclosing elements in square brackets, like `[1, 2, 3]`.
What is the output of the following code?
```python
x = "hello"
print(x[0])
```
✔✔ The output will be `h` because `x[0]` accesses the first character of the string.
How do you append an item to a list?
✔✔ You can use the `append()` method to add an item to the end of a list.
2