Making letters with “ * ” in Python 3 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Making letters with “ * ” in Python 3

How we can make the letters below with Python 3, only using ‘list’ and ‘for’ ‘if’ ‘else’ ‘elif’ This letter P: ***** * * ***** * * * And this letter C ****** * * * ******

29th Aug 2020, 10:13 AM
YAKUP KARAKAŞ
YAKUP KARAKAŞ - avatar
8 Answers
29th Aug 2020, 10:20 AM
Ayush Kumar
Ayush Kumar - avatar
+ 2
Try yourself YAKUP KARAKAŞ see below code for M. result_str=""; for row in range(0,7): for column in range(0,7): if (column == 1 or column == 5 or (row == 2 and (column == 2 or column == 4)) or (row == 3 and column == 3)): result_str=result_str+"* " else: result_str=result_str+" " result_str=result_str+"\n" print(result_str);
29th Aug 2020, 10:15 AM
Sâñtôsh
Sâñtôsh - avatar
+ 1
乂۝丹ⓨㄩک廾۝乂〖թг๏〗 thanks :) let me try this one, it is looking so cool. great job
29th Aug 2020, 10:22 AM
YAKUP KARAKAŞ
YAKUP KARAKAŞ - avatar
+ 1
Såñtösh Màràvi thanks, It is great but I am trying to understand how does your ‘if’ block works?
29th Aug 2020, 10:39 AM
YAKUP KARAKAŞ
YAKUP KARAKAŞ - avatar
+ 1
♤♢☞ 𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 ☜♢♤ thank you so much. Såñtösh Màràvi ‘s cose is good too. however I still didn’t understand how the if block works.
1st Sep 2020, 4:04 PM
YAKUP KARAKAŞ
YAKUP KARAKAŞ - avatar
0
Såñtösh Màràvi thanks for your advice. do you have something else to say?
29th Aug 2020, 10:17 AM
YAKUP KARAKAŞ
YAKUP KARAKAŞ - avatar
29th Aug 2020, 11:15 AM
YAKUP KARAKAŞ
YAKUP KARAKAŞ - avatar
- 1
Hi good night everyone my friend how are you all in tonight
30th Aug 2020, 4:39 PM
Reedy
Reedy - avatar