2020-08-13 10:00:20 +00:00
|
|
|
---
|
|
|
|
id: 5e7b9f060b6c005b0e76f05b
|
|
|
|
challengeType: 11
|
|
|
|
videoId: nLDychdBwUg
|
|
|
|
---
|
|
|
|
|
2020-12-16 07:37:30 +00:00
|
|
|
# --description--
|
|
|
|
|
2020-08-13 10:00:20 +00:00
|
|
|
More resources:
|
|
|
|
|
2020-12-16 07:37:30 +00:00
|
|
|
\- [Exercise](https://www.youtube.com/watch?v=ksvGhDsjtpw)
|
2020-08-13 10:00:20 +00:00
|
|
|
|
2020-12-16 07:37:30 +00:00
|
|
|
# --question--
|
2020-08-13 10:00:20 +00:00
|
|
|
|
2020-12-16 07:37:30 +00:00
|
|
|
## --text--
|
2020-08-13 10:00:20 +00:00
|
|
|
|
2020-12-16 07:37:30 +00:00
|
|
|
What will the following Python program print out?:
|
2020-08-13 10:00:20 +00:00
|
|
|
|
2020-12-16 07:37:30 +00:00
|
|
|
```python
|
|
|
|
def fred():
|
|
|
|
print("Zap")
|
|
|
|
def jane():
|
|
|
|
print("ABC")
|
2020-08-13 10:00:20 +00:00
|
|
|
|
2020-12-16 07:37:30 +00:00
|
|
|
jane()
|
|
|
|
fred()
|
|
|
|
jane()
|
|
|
|
```
|
2020-08-13 10:00:20 +00:00
|
|
|
|
2020-12-16 07:37:30 +00:00
|
|
|
## --answers--
|
2020-08-13 10:00:20 +00:00
|
|
|
|
2020-12-16 07:37:30 +00:00
|
|
|
Zap
|
2020-08-13 10:00:20 +00:00
|
|
|
|
2020-12-16 07:37:30 +00:00
|
|
|
ABC
|
2020-08-13 10:00:20 +00:00
|
|
|
|
2020-12-16 07:37:30 +00:00
|
|
|
jane
|
2020-08-13 10:00:20 +00:00
|
|
|
|
2020-12-16 07:37:30 +00:00
|
|
|
fred
|
2020-08-13 10:00:20 +00:00
|
|
|
|
2020-12-16 07:37:30 +00:00
|
|
|
jane
|
2020-08-13 10:00:20 +00:00
|
|
|
|
2020-12-16 07:37:30 +00:00
|
|
|
---
|
2020-08-13 10:00:20 +00:00
|
|
|
|
2020-12-16 07:37:30 +00:00
|
|
|
Zap
|
2020-08-13 10:00:20 +00:00
|
|
|
|
2020-12-16 07:37:30 +00:00
|
|
|
ABC
|
|
|
|
|
|
|
|
Zap
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
ABC
|
|
|
|
|
|
|
|
Zap
|
|
|
|
|
|
|
|
jane
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
ABC
|
|
|
|
|
|
|
|
Zap
|
|
|
|
|
|
|
|
ABC
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
Zap
|
|
|
|
|
|
|
|
Zap
|
|
|
|
|
|
|
|
Zap
|
|
|
|
|
|
|
|
## --video-solution--
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
|
# --hints--
|
|
|
|
|
|
|
|
|
|
|
|
# --solutions--
|
2020-08-13 10:00:20 +00:00
|
|
|
|