Description
We will build a Python programme A1Q2.py to display formatted messages in this problem.
Specifically:
1) Ask the users to input a string message which includes your name and a short message, i.e. ‘[Robert Kim] loves Hong Kong’. Make this entire message less than 40 characters, including your name. Put your name in the format: [first name] [Last name].
2) Ask users to input a positive integer that is greater than 40, which will serve as a field width subsequently.
3) Ask the user to input an alignment method [left, right or center].
4) Based on the following flow to write your code:
The sample output on different cases of input, the text in green indicates the user input or program output:
Alignment method
left
right
center
Wrong method
Output
Teresa Morris –
I have received phenomenal service that is consistent. The quality of work is A+ and the prices are very reasonable.
Stephanie Specht –
Excellent, thank you! Got solution extremely fast, within minutes.
John Ayad –
It was quality work and in a timely manner. It was the help I needed at the time, and I appreciate it so very much.
Wanda Mckinley –
I highly recommend this website. It is definitely the best.