Home > other >  Pycharm after the operation showed that the Process finished with exit code 0
Pycharm after the operation showed that the Process finished with exit code 0

Time:09-27

The code
Current_number=0
While current_number & lt; 10:
Current_number +=1
If current_number % 2==0:
The continue
Print (current_number)

The same input break is, small white one, please answer,

CodePudding user response:

Your print (current_number) also fall within the scope of the if statement indentation,
The statement is in front of the continue, or break,
It means that the print (current_number) is unreachable code!

CodePudding user response:

 current_number=0 
While current_number & lt; 10:
Current_number +=1

If current_number % 2==0:
Print (current_number)
The continue
  • Related