Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.


+2 votes

Iam just wondering how can I create the space before every sentence in the rock, paper, scissors game. For example
Round 1
human plays etc
How can I create the space before the "human play etc?"
Thank you so much

asked in CSC201 Spring 2021 by (8 points)

3 Answers

+5 votes

Simply create 3 spaces in every print function,
for example:

human = input('   Human, choose rock, paper, or scissors: ')


print(f'   Computer chooses {computer}')


print('   Tie')

Similarly, place spaces in every sentence you want it to be indented.
Format function can be used to do so.

Hope this helps!

answered by (244 points)
+3 votes

I just counted the spaces on moodle and typed the correct amount in front of the statement. For example:

print(" Human plays...")

There may be an easier way to do it, but I haven't found it.

answered by (8 points)
+3 votes

What I did was for all the indented outputs such as the choice input, the computer chooses ... and the print for every if and elifs until the final scores are displayed, I put three spaces after the quotation. I couldn't do it any other way, although there might be an easier method.

Hope that helps,

answered by (1.1k points)