Coding Exercise #15
🌶️
👉 Here is a short Python quiz to test your core Python skills. Please select the correct answer to the questions below.
1. What would the following code output?
def foo(x):
return x[1]
print(foo((1,2,3)))2. What will the following code output?
def bar(y):
return y[-1]
print(bar([4, 5, 6, 7]))
3. What would be “squares” equal to?
squares = [x**2 for x in range(5)]Subscribe below to get a new Python project or exercise daily or upgrade to our paid plan to view the archive of projects, exercises, and solutions.


