Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+3 votes

for question 2 I am stuck on the initial month and balance part of the table because it says I need one more space between the month and balance but if I add the space it doesn't work for the other example.

asked in CSC201 Spring 2021 by (1 point)

2 Answers

+2 votes

Oops nevermind, I figured it out!

answered by (1 point)
+1 vote

Just in case others have the same problem, I'll answer the question.
So like you said, you can't just add a space because that'll mess up the other example. So, in this case you would have to change the width parameter by using fstring.
Like: print(f'{word:2}')

answered by (1 point)
...