Program Console Vignaankosh.com
Execution Panel
Console is empty.
random 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.
import random
# Use a seed so this teaching example gives the same results
random.seed(7)
# Random number between 0 and 1
print("Random float:", random.random())
# Random integer between 1 and 10 (inclusive)
print("Random dice roll:", random.randint(1, 10))
# Random choice from a list
colors = ["Red", "Blue", "Green", "Yellow"]
print("Random color:", random.choice(colors))
# Shuffle a list
cards = ["Ace", "King", "Queen", "Jack"]
random.shuffle(cards)
print("Shuffled cards:", cards)
# Random float in a range
print("Random between 5 and 10:", random.uniform(5, 10))