Functions Calling Functions
Python
20 pts
Functions Calling Functions
Create two functions:
print_line()— prints a line of 20 equals signs (=). Use"=" * 20.print_header()— has a docstring, callsprint_line(), printsAbel Bakery, Asmara, then callsprint_line()again.
Call print_header() once. Expected output:
==================== Abel Bakery, Asmara ====================
Checklist
- Define
print_line()so that it prints exactly 20 equals signs. - Define
print_header()with a docstring as the first line of its body. - Inside
print_header(), callprint_line()before and after printing the bakery name. - Call
print_header()once.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
