Home > other >  To solve the pycharm Process finished with exit code 0
To solve the pycharm Process finished with exit code 0

Time:10-05

# bonus calculation
Def countBonus () :
The way=int (input (" please enter the earnings "))
If the way & lt;=10:
Bouns=the way * 0.1
Elif way & gt; 10 and the way & lt;=20:
Bonus=10 + (the way - 10) * 0.075 * 0.1
Elif way & gt; 20 and the way & lt;=40:
Bonus + 10 * 10 * 0.1=0.075 + (the way - 20) * 0.05
Elif way & gt; 40 and the way & lt;=60:
Bonus + 10=10 * 0.1 * 0.075 * 0.05 + + 20 (the way - 40) * 0.03
Elif way & gt; 60 and the way & lt;=100:
Bonus + 10=10 * 0.1 * 0.075 * 0.05 * 0.03 + + 20 + 20 (the way - 60) * 0.015
Elif way & gt; 100:
Bonus + 10=10 * 0.1 * 0.075 * 0.05 * 0.03 + 20 + 20 + 40 + (the way - 100) * 0.01 * 0.015
Print (" you "is the total revenue, the way of" ten thousand yuan ")
Print (" your bonus is a "bonus," ten thousand yuan ")

CountBonus ()



Then the result directly 弾 a
The Process finished with exit code 0
How to solve?

CodePudding user response:

CountBonus () to remove this statement before four Spaces,

CodePudding user response:

The
reference 1/f, Loeb Keith's reply:
countBonus () to remove this statement before four Spaces,

Go to also not line, the cause of the interpreter?

CodePudding user response:

Is a pop-up window or print in the console output, this is the normal information, says the program has been running over, no error message.
If it is a pop-up window can try in the Settings of pycharm look to see where I can set the display mode. If it is in the console printout is ignored.

CodePudding user response:

references a smile program monkey reply: 3/f
is a pop-up window or print in the console output, this is the normal information, says the program has been running over, no error message.
If it is a pop-up window can try in the Settings of pycharm look to see where I can set the display mode. If it is in the console printout is ignored.

Console, run after the show, I didn't input type, also does not display, advice on how to set

CodePudding user response:

The
reference 4 floor handsome! Response:
console, run after the show, I don't input type, also does not display, advice on how to set up

Looked at your code, indentation, didn't call because your countBonus method, which lines of code retract out of the call. The following
 
# bonus calculation
Def countBonus () :
The way=int (input (" please enter the earnings "))
If the way & lt;=10:
Bouns=the way * 0.1
Elif way & gt; 10 and the way & lt;=20:
Bonus=10 + (the way - 10) * 0.075 * 0.1
Elif way & gt; 20 and the way & lt;=40:
Bonus + 10 * 10 * 0.1=0.075 + (the way - 20) * 0.05
Elif way & gt; 40 and the way & lt;=60:
Bonus + 10=10 * 0.1 * 0.075 * 0.05 + + 20 (the way - 40) * 0.03
Elif way & gt; 60 and the way & lt;=100:
Bonus + 10=10 * 0.1 * 0.075 * 0.05 * 0.03 + + 20 + 20 (the way - 60) * 0.015
Elif way & gt; 100:
Bonus + 10=10 * 0.1 * 0.075 * 0.05 * 0.03 + 20 + 20 + 40 + (the way - 100) * 0.01 * 0.015
Print (" you "is the total revenue, the way of" ten thousand yuan ")
Print (" your bonus is a "bonus," ten thousand yuan ")

CountBonus ()


As for the Process... That sentence is just code program has been running over directly to ignore.

CodePudding user response:

The
reference 4 floor handsome! Response:
console, run after the show, I don't input type, also does not display, advice on how to set up


And the two print indentation is removed

CodePudding user response:

Setting problem, please see my blog, https://blog.csdn.net/D515756463/article/details/103660584

CodePudding user response:

The Process finished with exit code 0
The end of the program is running, non-zero status code is because of the end of the accident, all finished or def function calls, or didn't call
  • Related