Suppose you have some words and you ...
21 Sep 2021
Suppose you have some words and you want to right justify them, that is, align them to the right. Create a program that reads a word and prints it all right justified, in the same order as they appear in the input. Input: The first line of the input will contain an integer N (1 ≤ N ≤ 50) indicating the number of the following words. Each word is composed of up to 50 letters (‘A’-‘Z’ or 'a'-'z') and will contain at least one letter. Output: Print the words padded on the left with space characters so that they are all the same length as the longest word found in that text. Sample Input Sample Output 3 Bob Tommy Jim Bob Tommy Jim
Desklib
Solutions
21 Sep 2021
In the above problem, we can use a list to store words and then use that list to right justify the words. The Python code snippet for the above proble...
Get Expert Help
Related Questions
18-Apr-2024
how to describe five Porter's Life cycle ...
17-Apr-2024
research plan on the ethics in finance ...
12-Apr-2024
Help with my assignment please ...
10-Apr-2024
How does the Ukraine-Russian war increased transportation ...
10-Apr-2024
How does the Ukraine-Russian war increased transportation ...
08-Apr-2024
Explain page number 4 ...