numbers = [2,4,6,8,1,7,9] i=0 for numbers in numbers: i=i+1 if (numbers % 2) == 0: print(numbers,"是偶数") else: print(numbers,"是奇数")
运用for循环数组,判断语句为if~else
numbers = [2,4,6,8,1,7,9] i=0 for numbers in numbers: i=i+1 if (numbers % 2) == 0: print(numbers,"是偶数") else: print(numbers,"是奇数")
运用for循环数组,判断语句为if~else