Menu
CoddyTech

Run Your First Python Program

Lesson 1 of 48 in Coddy's Python for JavaScript Developers course.

Use your JavaScript experience to learn Python through short comparisons and runnable challenges. You do not need to complete a Coddy JavaScript journey first.

  • You can assign variables and work with strings and numbers in JavaScript.
  • You can read conditions, loops, functions, arrays, and objects.
  • You can follow a small program and predict its output.

Python classes are introduced later, so previous class experience is optional. The editor runs Python; labeled JavaScript examples are references to compare. Start by running the supplied program.

Your two files

Open main.py to see the Python program. driver.py is a supplied, read-only launcher. The editor opens the file you work on first. For this first lesson, leave both files unchanged and run the program.

challenge icon

Challenge

Beginner

Run the supplied program once. There is no input. It prints Python is ready followed by a newline. No edits are needed.

Your code goes in main.py. The locked driver.py starts your program and cannot be edited.

Try it yourself

# Starts the program in main.py. Edit main.py to solve the challenge.
from runpy import run_module

run_module("main", run_name="__main__")

All lessons in Python for JavaScript Developers

Practice on your own: Online Python compiler