Python: Exercises: Basics


  1. In the interactive interpreter, create an empty list. Append to it values of types

    • Integer

    • Floatingpoint

    • Boolean

    • List

    • Tuple

    • Set

    • Dictionary

    Does it work? If yes, print the list using the print() function.

  2. Do the same in an executable Python program

  3. What happens when you access a non-existent dictionary member?

  4. Write a program that takes a single digit as commandline parameter. Print the English word for that digit.