Discount and Final Price Calculation Dry Run in PYTHON

Discount and Final Price Calculation is an interactive PYTHON dry run visualizer from the Io 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.

Discount and Final Price Calculation Program Code

# Discount Calculator
price = float(input("Enter original price: "))
discount_percent = float(input("Enter discount percentage: "))

discount = price * discount_percent / 100
final_price = price - discount

print(f"\nOriginal Price: ₹{price:.2f}")
print(f"Discount: {discount_percent}%")
print(f"Discount Amount: ₹{discount:.2f}")
print(f"Final Price: ₹{final_price:.2f}")

View the complete Io programs page.

Program Console Discount and Final Price Calculation Topic: PYTHON Vignaankosh.com
Execution Panel
Step 0/0
Console is empty.