myscore = 567
myscore = ‘you got %s points’
print(message % myscore)
- myscore = 'you got %s points'
+ message = 'you got %s points'
1 Like
You overwrite the myscore
variable with the string 'you got %s points'
. I think you meant message = ‘you got %s points’
Copy/pasting your code helps, but in the future, you should also copy/paste the entire message, along with a brief description of what you intended the program to do and what it appears to be doing instead. This helps your helpers figure out how to help you.
Help us help you. Read this link first and learn how to format code so we can help you better. About the Python Help category You will get more help this way.
Also be sure to include this information in every new post you make.
- Your OS name and version.
- Which Python, Colab, Jupyter, Pyscript you are using and it’s version.
- If you are using a development environment. This is normally required except perhaps while taking a Python class.
- Your IDE name and version like Pycharm or Visual Studio Code. VSC sometimes has addons that can help you.