Page 81 - Touchcode_C8_Flipbook
P. 81

Step 1:   Visit the link:  https://arcade.makecode.com/






















                  Step 2:   Create a new project and name it ‘Area of triangle’.

                  Step 3:   Create the variables as shown.

























                  Step 4:   From ‘Variable’, drag the ‘set Side1 to’ and attach it to the ‘on start’ block as shown
                            below. Similarly drag the remaining blocks and attach them as shown.






                                                                                             Coding Tip!

                                                                                             Herons formula:
                                                                                             = Square root of (s (s-a)
                                                                                             (s-b)(s-c))  where  a, b
                                                                                             and c are the sides of
                                                                                             the triangle and s is the
                                                                                             semi perimeter  of the
                                                                                             triangle, i.e.,
                                                                                             s = (a+b+c)/2.



                                                                                        Advanced Sequencing      79
   76   77   78   79   80   81   82   83   84   85   86