• 12 hours
  • Easy

Free online content available in this course.

course.header.alt.is_video

course.header.alt.is_certifying

Got it!

Last updated on 4/18/24

Structure Your Code in a Python Program

Evaluated skills

  • Structure your code in a Python program
  • Question 1

    Which of the following sets of class names is clearest?

    • DatabaseField, StringDatabaseField, DateDatabaseField

    • Level, Cave, Building

    • Button, Start, Quit

  • Question 2

    Which of the following happen when a module is imported? (It could be multiple answers!)

    Careful, there are several correct answers.
    • The class and method definitions in that file are loaded.

    • All the imports in that module are imported too.

    • All the code in that module is executed.

  • Question 3

    An exception is raised in a function. When does the program crash?

    • Immediately.

    • Immediately, if it isn’t caught in that function.

    • When there are no more methods or functions to pass the exception up to.

Ever considered an OpenClassrooms diploma?
  • Up to 100% of your training program funded
  • Flexible start date
  • Career-focused projects
  • Individual mentoring
Find the training program and funding option that suits you best