본문 바로가기
python

print odd numbers (1 ~199)

by sj0020 2020. 6. 12.

3가지 방법

 

def main():
for i in range (100):
	print (i*2 +1)
for i in range(200):
	if i % 2 == 1:
    	print (i)
v=1
while v<200:
	print (v)
	v +=2