Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Built-In Iterators in Use | Python Iterators
Funktionelle Programmeringskoncepter i Python

bookChallenge: Built-In Iterators in Use

Stryg for at vise menuen

Opgave

Swipe to start coding

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

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 5. Kapitel 2

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

Sektion 5. Kapitel 2
some-alt