Click here to Skip to main content
15,890,361 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am programming a chatbot, and it is going well. One last touch I want to add is adding a background to the text. I have been able to add a background using this code:

import turtle
screen = turtle.Screen()
# set the screen background
screen.bgpic("filename.png")


this successfully sets the screen background, but when I run code after it like this:

print('Hello, World!')


It runs it and the text shows up on a different screen.
How can I make it so that the text shows up on the background image?

What I have tried:

I have tried looking up code to make the text and the image show up on the same screen, but I couldn't find anything.
Posted
Updated 11-Dec-20 9:20am

1 solution

I think you need to use "write" for turtle graphics (versus "printing").

turtle.write() function in Python - GeeksforGeeks[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900