Electricity Bill (basic slab) Dry Run in PYTHON

Electricity Bill (basic slab) is an interactive PYTHON dry run visualizer from the If 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.

Electricity Bill (basic slab) Program Code

units = float(input("Enter electricity units: "))

if units <= 100:
    bill = units * 5
    category = "Low Bill"
elif units <= 200:
    bill = 100 * 5 + (units - 100) * 7
    category = "Medium Bill"
else:
    bill = 100 * 5 + 100 * 7 + (units - 200) * 10
    category = "High Bill"

print(f"Units: {units}, Bill: ₹{bill:.2f}, Category: {category}")

View the complete If programs page.

Program Console Electricity Bill (basic slab) Topic: PYTHON Vignaankosh.com
Execution Panel
Step 0/0
Console is empty.