class Alphabet:
def __init__(self,line1,line2,line3,line4,line5):
self.line1 = line1
self.line2 = line2
self.line3 = line3
self.line4 = line4
self.line5 = line5
def display_alphabet_L1(self):
print(self.line1,end = "")
def display_alphabet_L2(self):
print(self.line2,end = "")
def display_alphabet_L3(self):
print(self.line3,end = "")
def display_alphabet_L4(self):
print(self.line4,end = "")
def display_alphabet_L5(self):
print(self.line5,end = "")
def get_alphabet_L1(self):
return self.line1
def get_alphabet_L2(self):
return self.line2
def get_alphabet_L3(self):
return self.line3
def get_alphabet_L4(self):
return self.line4
def get_alphabet_L5(self):
return self.line5
def print_star_L1(self):
hastag_to_star(self.line1)
def print_star_L2(self):
hastag_to_star(self.line2)
def print_star_L3(self):
hastag_to_star(self.line3)
def print_star_L4(self):
hastag_to_star(self.line4)
def print_star_L5(self):
hastag_to_star(self.line5)
def hastag_to_star(temp):
i = 0
while(i < len(temp)):
if(temp[i] == "#"):
print("*",end = "")
else:
print(" ",end = "")
i += 1
def draw_alphabet(alphabet_group,word):
ip = 0
while(ip < 5):
iw = 0
while(iw < len(word)):
if(word[iw] == "B"):
print_func(alphabet_group,ip,0)
elif(word[iw] == "L"):
print_func(alphabet_group,ip,1)
elif(word[iw] == "U"):
print_func(alphabet_group,ip,2)
elif(word[iw] == "E"):
print_func(alphabet_group,ip,3)
iw += 1
print()
ip += 1
def print_func(alphabet_group,ip,alphabet_index):
if(ip == 0):
alphabet_group[alphabet_index].print_star_L1()
elif(ip == 1):
alphabet_group[alphabet_index].print_star_L2()
elif(ip == 2):
alphabet_group[alphabet_index].print_star_L3()
elif(ip == 3):
alphabet_group[alphabet_index].print_star_L4()
elif(ip == 4):
alphabet_group[alphabet_index].print_star_L5()
def setup():
B = Alphabet(" ##### ",
" # # ",
" ##### ",
" # # ",
" ##### " )
L = Alphabet(" # ",
" # ",
" # ",
" # ",
" ###### " )
U = Alphabet(" # # ",
" # # ",
" # # ",
" # # ",
" #### " )
E = Alphabet(" ###### ",
" # ",
"###### ",
" # ",
" ###### " )
alphabet_group = [B,L,U,E]
word = input("")
draw_alphabet(alphabet_group,word)
setup()
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
Link Video Presentation Resort Managemant System Project.
Video Presentation Resort Managemant System Project. จัดทำโดย พากษ์เสียง: คุณาสิน ทองมณี 5801012620011 ลำดับภาพ: สุพิชชา ศรีศิริ...
-
- 1NF หรือ Fisrt Normal Form มีเงื่อนไขอยู่ว่า ต้องไม่มีคอลลัมน์ใดในตารางที่มีค่ามากกว่า 1 ค่า หรือที่เรียกว่า Atomic ซึ่งหมายถึง ข้อมูลที่...
-
https://docs.google.com/spreadsheets/d/10Y6o-h8dAAKf7MHTtGvQDBJuzGkAx_X0WYVgj2nB8v0/edit?usp=sharing จากภาพจะเห็นว่า - เก...
ไม่มีความคิดเห็น:
แสดงความคิดเห็น