Skip to content
Advertisement

How to make a board in python?

I am trying to create a board that lets users choose the number of rows and columns but I can’t seem to put anything together!

For example if a user wants 3 rows and 3 columns I am trying to make it print out:

JavaScript

My code so far:

JavaScript

and this is what it outputs:

JavaScript

I feel really dumb for not being able to do something as basic as this but this was the best I was able to come up with! I sort of got it to print the number of rows / columns but i have no idea how to make it look “normal” or fill it in..

Can anyone more knowledgeable help me?

Thank you!

Advertisement

Answer

One of the many ways to do it:

JavaScript

For example, row =3, col =3 then output :

JavaScript

Alternatively,

Create a list-

JavaScript

Then print it-

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement