livepython.net

130. Python Program to Print a Welcome Banner Using a Function

EasyFunctions

Overview

Define your first function with def, then call it again and again.

Problem Statement

Write a function called show_banner() that prints these three lines:

*********************
Welcome to LivePython
*********************

Then read a whole number and call show_banner() that many times. For example, for 2 the banner is printed twice, one copy under the other.

Use input() with no prompt text: the tests type the input for you, and a prompt would end up in your output.

Input

One whole number, 1 or more. Example:

2

Output

The output for that example:

*********************
Welcome to LivePython
*********************
*********************
Welcome to LivePython
*********************

The tests try 3 different inputs.

Learn this firstChapter 15 · Python Functions: Define and Call Your Own
solution.py
# write your code here

EXPECTED OUTPUT

1*********************
2Welcome to LivePython
3*********************
4*********************
5Welcome to LivePython
6*********************

YOUR OUTPUT

Press Run to see your output here. Lines are compared with the expected output.