How to use the Python language, using a while loop to print out your student id contains an odd number? (if the student id is: 52894016)
CodePudding user response:
Number="52894016"
Xuehao=list (number)
I=0
While i
If the int (xuehao [I]) % 2==1:
Print (xuehao [I])
I +=1
CodePudding user response:
Number="52894016"
For I in number:
If the int (I)/2!=0:
Print (int (I))
CodePudding user response: