Implement a bitmap template generator

This commit is contained in:
Nick Chambers 2022-10-12 21:37:40 -05:00
parent c538f8ac34
commit db75a84f35
1 changed files with 38 additions and 0 deletions

38
solution-3.py Normal file
View File

@ -0,0 +1,38 @@
#!/usr/bin/env python3
phrase = input(f"Phrase: ")
bitmap = [
"....................................................................",
" ************** * *** ** * ******************************",
" ********************* ** ** * * ****************************** *",
" ** ***************** ******************************",
" ************* ** * **** ** ************** *",
" ********* ******* **************** * *",
" ******** *************************** *",
" * * **** *** *************** ****** ** *",
" **** * *************** *** *** *",
" ****** ************* ** ** *",
" ******** ************* * ** ***",
" ******** ******** * *** ****",
" ********* ****** * **** ** * **",
" ********* ****** * * *** * *",
" ****** ***** ** ***** *",
" ***** **** * ********",
" ***** **** *********",
" **** ** ******* *",
" *** * *",
" ** * *",
"...................................................................."
]
for line in bitmap:
new_line = ""
for idx, point in enumerate(line):
if point == " ":
new_line += " "
else:
new_line += phrase[idx % len(phrase)]
print(new_line)