Find average of tuple elements Dry Run in PYTHON

Find average of tuple elements is an interactive PYTHON dry run visualizer from the Tuples 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 average of tuple elements Program Code

# Find average of tuple elements
marks = (78, 85, 92, 88, 76, 95, 89)
print("Marks:", marks)

# Average = Sum / Count
average = sum(marks) / len(marks)
print(f"Average = {average:.2f}")

# Manual calculation
total = 0
for mark in marks:
    total += mark
avg_manual = total / len(marks)
print(f"Manual average: {avg_manual:.2f}")

View the complete Tuples programs page.

Program Console Find average of tuple elements Topic: PYTHON Vignaankosh.com
Execution Panel
Step 0/0
Console is empty.