-
Notifications
You must be signed in to change notification settings - Fork 0
/
print_myname.py
77 lines (73 loc) · 2.71 KB
/
print_myname.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#Name Output Program
factor = input("채워질 요소를 결정해주세요:")#글씨를 나타낼 요소결정
#이름의 첫 글자
a = [[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1],
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
[1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
[0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0],
[0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0],
[0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0]]
#이름의 두번째 글자
b = [[0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0],
[0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0],
[0,0,0,1,1,0,0,0,0,0,0,1,1,0,0,0],
[0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0],
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
[0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0],
[0,0,0,1,1,0,0,0,0,0,0,1,1,0,0,0],
[0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0],
[0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
[0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0]]
#이름의 세번째 글자
c = [[0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1],
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1],
[0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1],
[0,0,0,0,0,0,0,0,0,0,1,1,0,1,0,1],
[0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,1],
[0,0,0,0,0,0,0,0,1,1,0,0,0,1,0,1],
[0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,1],
[0,0,0,0,0,0,1,1,0,0,0,0,0,1,0,1],
[0,0,0,0,0,1,1,0,0,0,1,1,1,1,0,1],
[0,0,0,0,1,1,0,1,1,0,0,0,0,1,0,1],
[0,0,0,1,1,0,0,0,1,1,0,0,0,1,0,1],
[0,0,1,1,0,0,0,0,0,1,1,0,0,1,0,1],
[0,1,1,0,0,0,0,0,0,0,1,1,0,1,0,1],
[1,1,0,0,0,0,0,0,0,0,0,1,1,1,0,1],
[1,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1],
[0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1]]
# 2차원 리스트의 0~15까지의 1차 인덱스
for i in range(16):
# 2차원 리스트에서 0~15까지의 2차 인덱스
# 이름 세 글자를 가로로 한줄씩 나타내기 위함
for j in range(16):
if a[i][j] == 1:
print(factor, end="") # end >>다음 줄로 넘어가기
else:
print(" ", end="")
for k in range(16):
if b[i][k] == 1:
print(factor, end="")
else:
print(" ", end="")
for g in range(16):
if c[i][g] == 1:
print(factor, end="")
else:
print(" ", end="")
print("")