Understanding - Beginner, exercise 1
Text
Consider the following snippet of Python code:
def t(x, y):
return x + y - 2
print(t(5, t(3 + 2, 2)))
Which value will be printed on screen if we execute such code?
Solution
8
Additional material
The runnable Python file is available online. You can run it executing the command python exercise_1.py
in a shell.