1 #!/usr/bin/env python2 #-*-coding:utf-8-*-3 #all odd and even numbers within the output 1-1004 """5 Assign value to start equals 1,while true, loop starts, assignment of temp equals the remainder of start and 26 if temp equals 0 (the remainder equals 0,start is odd, otherwise an even number) prints the start7 Otherwise pass, nothing is executed, start assignment equals start plus 1, until the assignment equals 1008 while the condition is false, the loop no longer holds! 9 #打印偶数同理! Ten """ OneStart =1 A whileStart < 101: - #print (start) - #if it is odd, the output the #Otherwise, no matter - #(transliteration: Talk about breaking) -temp = start% 2 - #temp is the remainder, remainder = 0, even, otherwise: odd + iftemp = =0: - Print(start) + Else: A Pass#Pass does not perform anything (must write, do not write grammar error) atStart + = 1
Getting started with Python: all the odd and even numbers within the output 1-100