Program Console Vignaankosh.com
Execution Panel
Console is empty.
datetime module Built-in is an interactive PYTHON dry run visualizer from the Builtin 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.
from datetime import datetime, date, timedelta
# Use a fixed sample so the dry run is reproducible
sample_time = datetime(2026, 8, 7, 14, 30, 25)
today = date(2026, 8, 7)
print("Sample date & time:", sample_time)
print("Sample date:", today)
print("Formatted:", sample_time.strftime("%d-%m-%Y %H:%M:%S"))
tomorrow = today + timedelta(days=1)
yesterday = today - timedelta(days=1)
print("Tomorrow:", tomorrow)
print("Yesterday:", yesterday)
# Compare dates
deadline = date(2026, 8, 10)
if today < deadline:
print("The deadline is still ahead")