Question: Write a function, header, that takes a string text and a single character surround as parameters and displays the following: Example call Displays header (
Write a function, header, that takes a string text and a single character surround as parameters and
displays the following:
Example call Displays
headerHello World!
Hello, World!
headerPython Rocks
Python Rocks
headerCoders EVER
Coders EVER
Steps to Implement:
Understand what to implement
Begin with an example. Write the lines of code to output one of the example test cases. You
may find it useful to make variables for values that are used multiple times:
string Hello World! # text to display
printlenstring # display top line
print string, # display middle line
printlenstring # display bottom line
Test the code
Run the code to ensure the output matches the target example
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
