Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Practice Creating and Indexing Lists!
Preview
Video Player
00:00
00:00
00:00
- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
An overview of the challenge for list creation.
Need help?
Check out the following videos if you want to brush up on any key skills!
- List Creation from Introducing Lists
- Adding items to lists
- Indexing lists in Python
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
[MUSIC]
0:00
Greetings and salutations, Ken here.
0:09
In this python practice session,
you'll get a chance to
0:12
practice working with creating lists,
and accessing them with index values.
0:14
It helps to reinforce what
you've learned already.
0:19
If you find it to be too challenging,
you might need to review some videos.
0:22
I've put a few links in the teacher's
notes for some resources.
0:27
We'll be using the workspaces for
this practice, so go ahead and
0:31
open the attached work space.
0:34
As we've learned, lists are a very
common thing in programming, and
0:36
in our daily lives.
0:40
The 2018 FIFA World Cup recently wrapped,
and
0:42
it gave me an idea of a list
of players on the soccer team.
0:45
Really, it can be anything team though,
right?
0:50
Lacrosse, baseball, a development team,
0:52
an operations team,
they are all teams with lists of people.
0:55
For this challenge though,
we will use a soccer team as an example.
0:59
I've started a file, team.py,
that has some code comments for
1:04
tasks that I'd like you to complete.
1:07
I'd like you to read through them and
1:13
complete each one to
complete this challenge.
1:14
Let's see the completed program in action.
1:17
Give some space here.
1:20
The program starts off asking if we
would like to add players to the list.
1:26
If we enter yes,
we're then asked to enter a player's name.
1:31
I'll add myself to the team.
1:34
Yes, I want other players.
1:37
We'll add Craig.
1:41
And we need more, and we’ll add Alena.
1:45
Soccer teams typically have
more than three players, but
1:50
we’re just having a friendly interoffice
game of three on three, so I’ll enter no.
1:53
We’re shown a team roster here with
a number of players on the team,
2:00
the player number and the player name.
2:03
Next, we're asked to select
the player number for our goalkeeper.
2:06
Alena is always on top of things, and
I"m sure she'll make an awesome keeper, so
2:11
we'll enter a 3 for player 3.
2:15
We get back a statement that
the keeper for the game will be Alena.
2:17
Nice, and that's it.
2:21
If you get stuck along the way,
check the teacher's notes for
2:24
links to videos that cover the concepts
needed to complete this session.
2:27
If you're not able to fully complete
the program, don't worry, when we get back
2:31
together, I'll walk you through one
approach I came up with in the next video.
2:35
See you soon.
2:40
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up