Imports and modules
What do these lines print?
>>> def my_function(counter=89):
>>> print("Counter: {}".format(counter))
>>>
>>> my_function()
- Counter: 101
- Counter: 12
- Counter: 89
What do these lines print?
>>> def my_function():
>>> print("In my function")
>>>
>>> my_function
- function my_function at …
- “In my function”
- In my function
- Nothing
What do these lines print?
>>> def my_function(counter):
>>> print("Counter: {}".format(counter))
>>>
>>> my_function(12)
- Counter: 12
- Counter: counter
- Counter: c
What do these lines print?
>>> def my_function():
>>> print("In my function")
>>>
>>> my_function()
- function my_function at …
- “In my function”
- In my function
- Nothing
What do these lines print?
>>> def my_function(counter=89):
>>> return counter + 1
>>>
>>> print(my_function())
- 90
- 1
- 89
- 891
What do these lines print?
>>> def my_function(counter=89):
>>> print("Counter: {}".format(counter))
>>>
>>> my_function(12)
- Counter: 101
- Counter: 12
- Counter: 89
