Embercode
✕
StringsQuick quiz

Formatting

6 questions. Covers Formatting output in Python.

Questions 1 to 5 of 6

  1. 1. What does this program print? ``python print(f"[{'abcdef':.3}][{7:<4}]") ``
  2. 2. What does this program print? ``python print(f'{1234567.891:,.2f}') ``
  3. 3. In the format {name:<12}, the < makes the text ______ within its 12 columns. Write the phrase that fills the blank.

    Type your answer.

  4. 4. What does f'{0.4567:.1%}' print?
  5. 5. What happens when this line runs? ``python print(f'{3.5:d}') ``

5 question(s) left on this page.

Typed answers ignore extra spaces and, for most questions, capital letters.