Creating and Importing Your First Module Dry Run in PYTHON

Creating and Importing Your First Module is an interactive PYTHON dry run visualizer from the Modules programs section. Study the source code, then use the execution controls to follow each step, variable update, highlighted line, and console output.

This page provides a browser-based dry run with source-code highlighting, auto-scroll, voice narration controls, and execution output for learning the program step by step.

Creating and Importing Your First Module Program Code

# File 1: mymath.py
def welcome(name):
    return f"Hello {name}, welcome to modules!"

pi_value = 3.14159

def add_two(x, y):
    return x + y

# File 2: main.py
import mymath

print(mymath.welcome("Student"))
print("Value of pi:", mymath.pi_value)
print("10 + 20 =", mymath.add_two(10, 20))

View the complete Modules programs page.

Program Console Creating and Importing Your First Module Topic: PYTHON Vignaankosh.com
Execution Panel
Step 0/0
Console is empty.