Hello,
I have been writing a logic test in my program. When the person answers a question correctly the score goes up by 1 point. At the end I want to print the score but I have been experiencing some problems.
When I try this:
Thankyou,
I have been writing a logic test in my program. When the person answers a question correctly the score goes up by 1 point. At the end I want to print the score but I have been experiencing some problems.
When I try this:
print(score + "/3")It does not work.
Error:Traceback (most recent call last): File "/Users/joelamond/Documents/Logic Test.py", line 24, in <module> print(score + "/3") TypeError: unsupported operand type(s) for +: 'int' and 'str'When I try this:print(score,"/3")It prints but with a space between the number and the slash.
Output:0 /3I would like it prints like this:Output:0/3How can I do that?Thankyou,
