Language/Python

Python. 99Class

out of coding 2019. 8. 25. 15:43

언어들 마다 가장 단순한 특성들을 보여주는 부분이 99Class 인거 같다.

for row in range(2, 10):
    print("*** " + str(row) + "단 ***")
    for column in range(1, 10):
        print(row, "*", column, "=", row * column)

결과

*** 2단 ***
2 * 1 = 2
2 * 2 = 4
2 * 3 = 6
2 * 4 = 8
2 * 5 = 10
2 * 6 = 12
2 * 7 = 14
2 * 8 = 16
2 * 9 = 18

...