Challenge: Retrieving Information from Nested Tuple
Swipe to start coding
You've been provided with a tuple named people
that holds data on individuals' names, ages, and heights in the format: (('name', age, height), ('name', age, height), ...)
. Here's a snapshot of the data:
Name | Age | Height |
---|---|---|
Alex | 23 | 178 |
Noah | 34 | 189 |
Peter | 29 | 175 |
John | 41 | 185 |
Michelle | 35 | 165 |
To extract specific information using positive indexing, follow these steps:
- Display details (the entire tuple) about Peter.
- Display John's height.
- Display Alex's age.
Løsning
Tak for dine kommentarer!
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat
Awesome!
Completion rate improved to 1.64
Challenge: Retrieving Information from Nested Tuple
Stryg for at vise menuen
Swipe to start coding
You've been provided with a tuple named people
that holds data on individuals' names, ages, and heights in the format: (('name', age, height), ('name', age, height), ...)
. Here's a snapshot of the data:
Name | Age | Height |
---|---|---|
Alex | 23 | 178 |
Noah | 34 | 189 |
Peter | 29 | 175 |
John | 41 | 185 |
Michelle | 35 | 165 |
To extract specific information using positive indexing, follow these steps:
- Display details (the entire tuple) about Peter.
- Display John's height.
- Display Alex's age.
Løsning
Tak for dine kommentarer!
Awesome!
Completion rate improved to 1.64single