Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started