> For the complete documentation index, see [llms.txt](https://computational-thinking-in-room11.gitbook.io/apcsp-room112/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://computational-thinking-in-room11.gitbook.io/apcsp-room112/data-and-information/term-1-project.md).

# Term 1 Project: Is that a Triangle?

When we don't have time for an exam!

Build a Program - using procedures blocks, conditional and iteration that asks a user to think of shape and then enter the number of sides of that shape. The use of a List is optional, but all of your programs should include procedural abstraction (when you build your own blocks)&#x20;

![](https://2847050208-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LxgH31n3oLnSdFPT4XY%2F-M1f-BCiNkpNhZBAnpX5%2F-M1f3apefxRnLPhAqP20%2Fsource.gif?alt=media\&token=c7334b64-f248-4700-9515-f4b06a4cf11c)

**These are the BASIC minimum requirements -** you are expected to add  unique functionality or user interface extensions.  Your program structure, variable names and extensions should be both unique from your neighbors code and use proper naming techniques.

* [ ] Prompt user to think of a shape and enter the number of sides
* [ ] Display /Communicate the corresponding polygon&#x20;
  * [ ] program needs to only identify by name triangle, square, pentagon, hexagon
  * [ ] program should communicate if they enter a value that is NOT a polygon
  * [ ] program could draw or display a polygon of any number of sides&#x20;
* [ ] IF the user Enters 3 and they are thinking of a triangle then refer to then you need to prompt for more information

```
If user is thinking of a triangle

Prompt the user to enter the three side lengths and then use the Triangle Inequality Therom
    //the sum of two sides must be larger than the 3rd side
    
    a + b > c
    a + c > b
    b + c > a
    
    If all of these conditions evaulate to true then it is possible to draw a triangle with those values
    
    
```

* [ ] Display/Communicate the results of your triangle testing (above)
  * [ ] Is it an equilateral?
  * [ ] Go Crazy - is it a right triangle?&#x20;
    * [ ] hint: asquared + bsquared = csquared
* [ ] Can you draw it?&#x20;
  * [ ] hint - you will need the angles so look below for the `Law of Cosines`
    * [ ] TIP: SNAP has a cosine, sine and tangent  operator - look at the `sqrt` block

![](https://2847050208-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LxgH31n3oLnSdFPT4XY%2F-M1g7I0EvfUSUq2dMpYB%2F-M1g7mEXL-J22VZyVelH%2Fimage.png?alt=media\&token=ba422f7a-a3fc-462a-bf7d-5cea86a60eab)

![](https://2847050208-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LxgH31n3oLnSdFPT4XY%2F-M1g7I0EvfUSUq2dMpYB%2F-M1g7PTTAva8Y7mFuGZI%2Fimage.png?alt=media\&token=c5e6c3ca-d599-405b-bb07-e622e5f7e0b2)

Extensions: Design a user interface, tell them more about the triangle, calculate the area? (1/2 base \* height)...and on and on and on
