Play With Triangles

This application allows users to test their knowledge of triangles, areas, properties, and types. Users have the following menu options -

  1. To enter the 3 angles of a triangle and check if they form a valid triangle.
  2. To enter the base and height of a right-angled triangle and find the hypotenuse.
  3. To enter the base and height of a triangle and find its area.
  4. Given the 2 angles of a triangle, the user has to find the 3rd angle.
  5. A short quiz on triangles and their types.

Play with triangles image

Tech Stack

  • HTML
  • CSS
  • ReactJS

Project Learnings

My key takeaway was developing an understanding of how multiple states are managed in an application. I also learned how to create dynamic user menu options.

Project Challenges

  • One major challenge I faced was handling states for the user's answers to questions.
  • Another challenge was adding styles to specific questions that users answered incorrectly or answered correctly. Since DOM selectors couldn't be used, I realized this could be solved by styling elements using classes.