Def peven (n) :
N=input (" please enter a number n:)
N=int (n)
Int I, a
I=2 n + 1
While I> 1.
A=1/I
The sum +=a
I=I - 2
The else
Print (sum)
CodePudding user response:
Variable sum is not defined, there is no initial value, on the other hand, don't suggest doing it in a built-in function name variable name,CodePudding user response:
A small piece of code, the error of too many,int I, a
This is not the c language, don't need to define variables
Please refer to!
CodePudding user response:
Suggested for, the simple with the, programming is for convenience