Block letters python 3 course

hello!
So I’m very new here and just started the python3 course, i went to start the block letters project and after multiple attempts i cant seem to figure it out. I’ve checked previous discussions, such as the one here: block letters
i think the biggest problem im having is im not being prompter to “start” it, is there something im missing? thank you in advance.

1 Like

Hi Jaakevincent,

Consider the letter “A”:

image

There are 7 rows and 5 columns.

  • The first row has 2 empty spaces, 1 star, and 2 empty spaces
  • The second row has 1 empty space, 1 star, 1 empty space, 1 star, and 1 empty space
  • The third row has 1 start, 3 empty spaces, and 1 star
  • The fourth row has 5 star, and 0 empty spaces
  • The fifth row has 1 start, 3 empty spaces, and 1 star
  • The sixth row has 1 start, 3 empty spaces, and 1 star
  • The seventh row has 1 start, 3 empty spaces, and 1 star

Basic method

The easiest why to achieve this in Python would be like this:

print('  *  ')
print(' * * ')
print('*   *')
print('*****')
print('*   *')
print('*   *')
print('*   *')

The following letters, and the complete alphabet can be written in this manner:

image

Advanced method

A more advanced way to print the letter “A” would be like so:


def letter_a():
    output_str = ''
    for row in range(0, 7):
        for column in range(0, 7):
            if ((column == 1 or column == 5) and row != 0) or ((row == 0 or row == 3) and (column > 2 and column < 4)):
                output_str += "*"
            else:
                output_str += " "
        output_str += "\n"
    return output_str

In order to do this, you have to conceptualize the entire letter as a 7X5 block of rows and columns, and determine where you want to print a star and where you want to print a space - Does that make sense?

Let me know if this explanation helps you negotiate the problem. If you have more questions, please ask!

Best regards,

hi! thank you for the reply and for explaining how to go about the program! However, my issue is not being able to actually start the module, the yellow “start” button wont allow me to click it. it wont show up yellow, it is greyed out if that makes sense?

1 Like

I have the very same problem. I am also very new here, came here less than 24 hours ago, so I may not understand, how all this works. Please help!

My apologies. Unfortunately, I do not have access to the course so I cannot check it out myself - Can you send me a screenshot of what you’re experiencing?

Thanks!

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.