QUESTION IMAGE
Question
finish the format string to get the output shown below. exam {}.format(exam) <10 >10 ^10
Step1: Understand string formatting
In Python, the format method is used to insert values into a string. The basic syntax is '{}'.format(value). Here, we need to make sure the output is 'Exam' which has a length of 4.
Step2: Analyze the options
<10in formatting ('{:<10}'.format('Exam')would left - align the string'Exam'in a field of width 10. But we just want the string itself.>10(right - align in width 10) is not relevant as we don't need alignment for the given output.^10(center in width 10) is also not relevant.- The simple
{}in'{}'.format('Exam')will just insert the string'Exam'as it is.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
{}