Profit / Loss / No Profit No Loss Dry Run in PYTHON

Profit / Loss / No Profit No Loss 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.

Profit / Loss / No Profit No Loss Program Code

cp = float(input("Enter Cost Price: "))
sp = float(input("Enter Selling Price: "))

if sp > cp:
    print("Profit")
elif sp < cp:
    print("Loss")
else:
    print("No Profit No Loss")

View the complete If programs page.

Program Console Profit / Loss / No Profit No Loss Topic: PYTHON Vignaankosh.com
Execution Panel
Step 0/0
Console is empty.