Objective
Create a Python program with a function called write_centered_underlined that receives a text and displays it centered and underlined with the character -, assuming a width of 80 characters.
Instructions
- In the
mainfunction, ask the user for a text. - Implement the function
write_centered_underlinedwith the text as a parameter. It displays the text centered and a line of 80-characters below it. - Call the function with the text entered by the user.
Hello!
Hello!
--------------------------------------------------------------------------------
Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.
Start exercise