Python Exercise Example 2
Python Exercise Example 2
Title: Corporate bonuses based on profit commission. When profits (I) is less than or equal to $ 100,000, bonus of 10% can be mentioned; when profits exceeding 10 million, less than 20 million, some 10 million less than the 10% commission, higher than 100,000 yuan part of cocoa commission of 7.5%; when between 200,000 to 400,000, more than 20 million parts can be 5% commission; when between 400,000 to 600,000 higher than 400,000 yuan section, you can deduct a percentage of 3% ; when between 600 thousand to 1 million, more than 60 million yuan section, you can deduct a percentage of 1.5%, higher than 100 million, more than 1 million yuan part 1% commission from the keyboard input of the month profit I, should seek Total bonuses paid?
Program Analysis: Please use the number of axes boundaries, location. The growing need to define integer bonus note definition.
Source Code:
Examples (Python 2.0+)
The above example output is:
净利润:120000 1500.0 10000.0 11500.0