Find square and cube using lambda Dry Run in PYTHON

Find square and cube using lambda is an interactive PYTHON dry run visualizer from the Special 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.

Find square and cube using lambda Program Code

# Lambda for square and cube
square = lambda x: x ** 2
cube = lambda x: x ** 3

num = 7
print(f"Number: {num}")
print(f"Square: {square(num)}")
print(f"Cube: {cube(num)}")

View the complete Special programs page.

Program Console Find square and cube using lambda Topic: PYTHON Vignaankosh.com
Execution Panel
Step 0/0
Console is empty.