Challenge: Built-In Iterators in Use
Sveip for å vise menyen
Oppgave
Sveip for å begynne å kode
Write a function named format_scores that takes two lists, names and scores, of equal length.
- Use Python's built-in iterators to process both lists in parallel.
- The numbering should start at 1.
- Return a list of these formatted strings, in order.
- Expected result:
'1. Alice scored 85','2. Bob scored 92','3. Charlie scored 78'.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 5. Kapittel 2
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Seksjon 5. Kapittel 2