Feb-04-2020, 10:46 PM
Is that the actual wording of the assignment? I see no reason to import time. You might need math (sqrt) though depending on the way you need to solve this.
Of course you already do know how to create a square from two triangles. If you draw a square and then a line connecting two opposite corners you have two triangles with the line you drew being the hypotenuse of both triangles. They are also right triangles which means you can use simple trigonometry to calculate the length of the other sides which is the size of the square.
Why you need to draw the square with the turtle module instead of just printing the size is a bit weird though.
Show us the actual assignment and any code you've written and we can help you figure this out...
Of course you already do know how to create a square from two triangles. If you draw a square and then a line connecting two opposite corners you have two triangles with the line you drew being the hypotenuse of both triangles. They are also right triangles which means you can use simple trigonometry to calculate the length of the other sides which is the size of the square.
Why you need to draw the square with the turtle module instead of just printing the size is a bit weird though.
Show us the actual assignment and any code you've written and we can help you figure this out...
"So, brave knights, if you do doubt your courage or your strength, come no further, for death awaits you all with nasty, big, pointy teeth!" - Tim the Enchanter