Page 90 - TP_Play_V2.1_class6
P. 90

Example 4: Write an algorithm and draw a flowchart to calculate the factorial of a number.

                                  Algorithm:                                         Flowchart:
                  Step 1  Start.                                              Start

                  Step 2  Read the number n.
                  Step 3  Let i=1, fact=1                                    Read n

                  Step 4   Check If i < = n Then Repeat
                                                                          i = 1, fact = 1
                           Step 5 and 6 until i=n
                  Step 5  fact=fact*i
                                                                                Is
                  Step 6  i=i+1                                                         No
                                                                              i < =
                  Step 7  Print fact                                           n?
                  Step 8  Stop.                                                   Yes

                                                                          fact = fact*i
                                                                                                      Print fact
                                                                            i = i + 1



                                                                              Stop


                       MIND MAPS

                  A Mind Map is a also a problem-solving technique that allows us to organise ideas, thoughts, or
                  concepts and their relationship graphically.

                  In this technique, we pick up the ideas that have common features. These ideas are then grouped
                  under one category, and the different categories are linked to the main topic using lines or
                  arrows. Let us draw a Mind Map for Computer:
                                                                                                Railway Station
                                                                                                  and Airport
                             Hardware
                                                                                                    Hospitals
                          Software
                                                                             Uses of Computer        School
                                                                                                     Homes


                                             Parts of Computer



                                                                 Computer




                                                  Types of Computers            Cost of Computers
                         Main Frame Computers
                         Micro Computers

                         Super Computers                                                           Comparing Prices



                   88       Play (Ver. 2.1)-VI
   85   86   87   88   89   90   91   92   93   94   95