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
header(Hello, World!,*)*****************
* Hello, World! *
*****************
header(Python Rocks,!)!!!!!!!!!!!!!!!!
! Python Rocks !
!!!!!!!!!!!!!!!!
header(Coders 4 EVER,+)+++++++++++++++++
+ Coders 4 EVER +
+++++++++++++++++
Steps to Implement:
1. 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
print(**(len(string)+4)) # display top line
print(*, string, *) # display middle line
print(**(len(string)+4)) # display bottom line
2. 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!