Python Forum
Python Starter-Looking for help!
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Starter-Looking for help!
#1
,hello

I'm a new python starter and I need help in a script that I need to make.

In the script, the user needs to input the length of the square's rib,

and from the length, the script needs to make a square that is made by 2 triangles with the length of the rib.
i need to use the import turtle and import time.
I'm using Python IDLE 3.7.4

thx!
Reply
#2
We'd be happy to help. What have you tried?
Reply
#3
(Feb-03-2020, 09:57 PM)micseydel Wrote: We'd be happy to help. What have you tried?

ive tried to do it but i dont know how to create the square from 2 triangles.
Reply
#4
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...
"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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Starter programing using Pyton for Madagascar software. Rosendo 1 2,733 Jun-16-2018, 05:46 AM
Last Post: buran
  Python Application Starter MistakenGuru 3 3,899 May-27-2017, 07:18 PM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020