for i inrange(1,10):
for j inrange(2,10):
print('%3d'%(i*j),end='') #3d๋ 3์๋ฆฌ๋ ๋ป ์ฆ ํ์นธ์ด ๋์ด์ ธ์ ๋์ด(2์๋ฆฌ ์์ด๋ฏ๋ก)print() #ํ์ค๋๊ธฐ
2-1. while ๋ฌธ๋ง ์ฌ์ฉํด์ ๊ตฌ๊ตฌ๋จ์ง๊ธฐ
num = 1while num < 9:
num = num+1
num2 = 0while num2 < 9:
num2 = num2+1print("%d * %d = %d" %(num,num2,num*num2))
print("\n")
3. ์ผ์ ์ด์์ ์ซ์๋ง ์ถ๋ ฅ(continue)
marks=[90,25,67,80,45]
num = 0for mark in marks:
num = num+1if mark < 60:
continue#์ด์ดํ๊ธฐelse:
print("%d !your good"%num)
sum =0for i inrange(0,11):
sum += i
print(sum)