11: Lists in Python

Extend it:

Store and use lots of data in the same variable
Lists in python : Store and use lots of data in the same variable

For this challenge you will create a naughty list for Santa to keep track of who doesn’t deserve any Christmas presents.

Challenges:

 
  1.  Create a list called santas_naughty_list and add 10 names

    Check your spelling of naughty. You can have more than 10 names if you want.

  2. Use append to add another name to the list

    It doesn’t matter which name you add

  3. Ask the user for a name and check if that person’s name is on the naughty list

    You’ll pass this self-marking test as soon as you ask the user a question but you’ll need to use if and in to do this properly

Page 1: Intro

Page 2: The theory: learn what you need to know as fast as possible.

Page 3: Try it: try out and adapt some working python code snippets.

Page 4: Debug it: Learn how to find and fix common mistakes.

Page 5: Extend it: Choose a project idea to use your newfound python skills.

Leave a Reply