Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

finish the format string to get the output shown below. exam {}.format(…

Question

finish the format string to get the output shown below. exam {}.format(exam) <10 >10 ^10

Explanation:

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

  • <10 in 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.

Answer:

{}