1,
需求 1
定义一个 print_line 函数能够打印 * 组成的一条分割线
- def print_line(char):
- print("*" * 50)
需求 2
定义一个函数能够打印 由任意字符组成的分割线
- def print_line(char):
- print(char * 50)
需求 3
定义一个函数能够打印 任意重复次数 的分割线
- def print_line(char,times):
- print(char * times)
需求 4
定义一个函数能够打印 5 行分隔符, 分割线要求符合需求 3
来源: http://www.bubuko.com/infodetail-3433701.html