"""====================================================================== Program: Sales Prediction Author: Chris Brockamp Date: April 9, 2015 Dev Env: Python Fiddle Description: Projects a company's annual profit given the user provides total projected sales. ======================================================================""" #set annual profit rate to a constant ANNUAL_PROFIT_RATE = .23 #get total sales total_sales = float(input("Enter your projection for total sales $")) print "%.2f" % total_sales #estimate annual profit annual_profit = ANNUAL_PROFIT_RATE * total_sales print "\nProjected annual profit is $%.2f" % annual_profit
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question