Skip to content

Instantly share code, notes, and snippets.

@nattybear
Last active April 12, 2017 02:20
Show Gist options
  • Save nattybear/588f83c829d21bc041812208b391e35b to your computer and use it in GitHub Desktop.
Save nattybear/588f83c829d21bc041812208b391e35b to your computer and use it in GitHub Desktop.
for i in range(2, 10):
for j in range(1, 10):
print('%d X %d = %d' % (i, j, i*j))
print()
@nattybear
Copy link
Author

nattybear commented Apr 12, 2017

파이썬 버전 3을 기준으로 작성했습니다.

for문을 이용한 이중 반복문으로 구구단을 구현했습니다.

출력은 보기 좋게 서식 문자를 사용했습니다.

각 단의 구분을 위해 반복문 중간에 개행을 삽입했습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment