All challenges
Multiple ChoiceIntermediate 30s

f-string Formatting

Choose the best answer for: f-string format spec
Options
  1. 1f-strings can't format numbers
  2. 2f'{x:.2f}' rounds to 2 decimal places
  3. 3f'{x,%}' multiplies by 100
  4. 4f'{x:2f}' rounds to 2 decimals

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle