Global Business Hours LIVE
🇺🇸USA:EDT
🇬🇧UK:BST
🇨🇦Canada:EDT
🇦🇺Australia:AEDT
BizAIProBizAIPro
Beginner · 20 min suggested practice · Reviewed 2026-10-31

Run Your First Python Script Locally

Use named values and print a simple calculation.

By BizAIPro Learning · Prerequisites: A computer where you can install Python 3. Browser execution is not provided in this release.

What you will learn

  • Save and run a Python 3 script
  • Distinguish numeric values from text
  • Read expected console output

Use the local practice environment

This release provides Python lessons and downloadable code, not a browser Python runtime. Install Python 3 from its official source and check the installation instructions for your operating system. Save the example as lesson.py. Run python lesson.py or python3 lesson.py according to your installation.

Read a binding

The assignment unit_price = 12 associates a name with a number. Python does not require a const or let keyword. A string uses quotes; a numeric value does not. Keep units clear in names so a reader knows whether a value represents money, minutes or a count.

Calculate before formatting

The multiplication operator combines numeric values. print displays a value in the terminal. Converting a numeric result to text for display is separate from computing it. If you read user input with input(), remember that the result is text and requires deliberate validation and conversion.

Practice a change

Predict the result when quantity becomes 4, then run the local file. If the command is not found, check the installation and command name rather than changing the script randomly. If the output differs, compare the saved file with the text you intended to run.

Keep a small record

Save the script and a brief note about the command you used. Reproducible steps help another person understand your work. The assessment here checks your understanding of output; it does not pretend to execute Python on the website.

Read the example

unit_price = 12
quantity = 3
total = unit_price * quantity
print(total)

Line-by-line explanation

  1. The first two lines name numeric values.
  2. The third line multiplies the values.
  3. print writes the result to the local terminal.

Expected output

36

Common mistakes to avoid

  • Running an unsaved version of a file
  • Treating input() as a numeric value automatically
  • Assuming this website executes Python
LOCAL PYTHON PRACTICE

Run this script on your computer

Python is not executed in this browser. Install Python 3 from the official Python website, save the script and run python bizaipro-lesson.py or python3 bizaipro-lesson.py.

unit_price = 12
quantity = 3
total = unit_price * quantity
print(total)

Check the expected output in the lesson, then complete the output-prediction assessment below.

Easy · OUTPUT PREDICTION

Predict a Python result

Run the lesson locally, then enter the output of print(12 * 3). This is an output-prediction assessment; the website does not execute Python.

KNOWLEDGE CHECK · PASSING SCORE 100%

What does print(total) do?

Choose one answer

Summary & next step

  • Can you now save and run a Python 3 script?
  • Can you now distinguish numeric values from text?
  • Can you now read expected console output?

Complete the exercise and pass the knowledge check to complete this lesson. Guest progress stays on this browser and does not sync across devices.

Related BizAIPro tools

Learn for free. Practice for real. Build your future.Search lessons