I cant figure out how to get background colour in turtle python to work - python-turtle

I've been trying to figure out how to input background colour for a day or two now.
I have been given a booklet to work through as I learn however once I reached the chapter on setting a screen size or background colour, it simply wont work.
I was told to use the code bgcolor("colour here") and when that didn't work, I searched online and found turtle.bgcolor("colour here") which didn't work either.
All I get back is an error saying the names aren't defined. setup(number 1, number 2) was also coming up with the same error but i couldn't find a substitute to it online. Could somebody please help me?
my teacher said just fill a shape for the background but I feel like it would feel more achieving if I figured it out instead. Thank You
below is a few clips of my codes.

You need to change from turtle import* into from turtle import * (extra space)
So your code will be:
from turtle import *
setup(800, 500)
bgcolor("black")

Related

Adding icon to Calculated Tableau Field

I am trying to add a small green arrow to a calculated field in Tableau. I cannot figure out for the life of me what to do. I have some images in my Tableau Repository, but the way my trainer is showing us is she is literally copy and pasting an image and it appears in the calculated field dialog box. I have tried to copy an image and paste it with no luck. Does anyone know how to do this? My trainer in the videos just does it like magic with no explanation of how to do it and it drives me insane. The code is very simple as I just want a green up arrow next to the growth percentage if its positive.
IF [Growth Percentage Profit] > 0
THEN "*green up arrow here*"
END
I exactly don't know how you are trying to do so.
but can get steps to do this from this link below.
may it could help you.
https://www.google.com/search?q=tableau+up+arrow+green&rlz=1C1UEAD_enPK957PK957&sxsrf=ALiCzsbLWY6J2Zh1jYWOX6_jq310QuQYow:1669030745991&source=lnms&tbm=vid&sa=X&ved=2ahUKEwjRi--FmL_7AhW5nP0HHbHsANEQ_AUoA3oECAEQBQ&biw=960&bih=936&dpr=1#fpstate=ive&vld=cid:0c41f2fc,vid:RSV3cm_mTHw

iOS - How to fill color in Prescribed area

when I touch one place,Within the Prescribed area fill the green color.like this:
and this:
click one of the fish,the both fish are red
Now I can only use the scan line seed filling algorithm to identify a closed area, but cannot identify multiple areas。
Like this coral, one click fills in multiple areas
if any one gives solution it would be so great,Thank you. (English is not my native language; please excuse typing errors.)
-----------------------------------------------------------
I have a crude idea.
First find two seed points on the ear(A and B).
Click on the picture, if you find that the stack contains seed point A, calling method floodFill(from: B) continue
but I don't konw how to implementation if you find that the stack contains seed point A in this demo
I have solved the problem, this is a Demo
This solution requires fixing two seed points on the leaves。
When a seed point is triggered for coloring, The other one is also coloring.
If there's a better solution, let me know please.

using excel to show Increase, Decrease and no change in Multiple colours

Looking for some help or to be pointed in the right direction. Been stuck on this for a while and the main issue is I don't even know where to start. I am sure there is a solution but my brain will not see it.
To use as an example I have a table that shows monthly results for multiple different areas:
What I want to do is in the gap along side each number is show an increase, decrease or no change, using up arrow down arrow and square. That I can do using conditional formatting my issue comes with the fact that I also want it to be multiple Colours. So it will take into account increase and decrease and whether they are in target.See below:
Atm I am copying and pasting each month. But having it automated would be amazing. The outcome would hopefully look like this:
I am hoping there is a way that I can do two things compare to the previous month and then check it against my table to see where it sits then display the appropriate symbol.
Thank you in advance for any help or a place to start.
So extremely easy to figure out once I looked at it in a simplistic way.
Firstly, I used: =IF(-SIGN(E26-G26)= 0, "n", IF(-SIGN(E26-G26)=1, "é", IF(-SIGN(E26-G26)=-1, "ê","")))
To compare the current number to the previous number and get a 1, 0 or -1 depending on if it had gone up down or stayed the same, using this it either displays é, n or ê. I then set the font on these cells to Wingdings. so they become up arrow, down arrow and a square.
Then I use conditional formatting to colour it based on the adjacent cells value.
No need for a long, complex formula
=IF(A2>A1,"t",IF(A2<A1,"u","v")) - set the font to Marlett

How to adjust the width of a font using the Uniscribe API

Please bear with me, I am new to Uniscribe so I hope this isn't a dumb question but I have been unable to find the solution anywhere else. So, here goes...
I am trying to use the Uniscribe API to reduce the width of a font; that is, given a specific font of a particular height, I would like to be able to reduce the width of each character (and all the relevant spacings) by some user-defined percentage.
I have successfully achieved this without calling any Uniscribe functions by obtaining a LOGFONT structure for the current font and adjusting the lfWidth field to be a percentage of its original value. I realise that this is just an average character width but it seemed to have the desired result.
However, when I try to do the same thing using Uniscribe I've noticed that the lfWidth field gets reset to 0 following calls to ScriptShape(). As a result, all rendered text is output using its original width. I'm at a loss to explain why this is or what to do to get around it.
Does anybody have any idea if it's even possible to do what I am trying to do?
You might want to start here (look at the Generate Glyph Information Section), then lead to this.
Hope it helps!

How to create a sidebar with latex?

I need to make a journal, and I want to have a "recommended books" on the side of the page within the last page of the journal, but I couldn't find anything that would give me this result. I'm already using multicols package for the content and i cant see how a graphicx package would help me out.
I want to have a nice blue background with rounded corners too, help is welcome ^^.
If you are already using multicol, just make it another column and draw a box around it with the usual techniques. Maybe not the fanciest solution, but it seems like it should work. Use \newcolumn in the multicol environment to put the sidebar in its own column. For your fancy boxes, try the fancybox package. With it, you can draw boxes with rounded corners.
On the other hand, this guy gets super fancy and uses the TikZ package to get colors and all sorts of stuff.

Resources