Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a function named right justify that takes a string named input_string as a parameter. If the input string is longer than 79 characters, the

image text in transcribed

Write a function named right justify that takes a string named input_string as a parameter. If the input string is longer than 79 characters, the string should be printed as is, Otherwise, the function should print the string with enough leading spaces that the last letter of the string is in column 80 of the display. (Note: Python has an inbuilt function called len that returns the length of a string. You can use this function to help perform the task). 1-Hef right justify(input string): pass # TODO: Complete this function 4 value input("Enter string to justify: ) 5 right justify(value)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is the role of an auditor in the accounting process?

Answered: 1 week ago

Question

7-2. How does a claim differ from an adjustment? [LO-2]

Answered: 1 week ago