Page 70 -
P. 70

starting to code


                             Your Programming Toolbox


                              You’ve got Chapter 1 under your
                              belt. Let’s look back at what
                             you’ve learned so far.                                                             CHAPTER 1











               Programming T ools

               * Programs are created from code statements:  Python T ools


                                                             * if/else branches
                       commands do things.                  * while loops
                       branches decide things.
                                                            * = assignment operator
                        loops repeat things.
                 * Conditionals help you decide if          * == equality operator


                         something is True or False.       * != inequality operator
                  * Assignment sets a name to a value.     * > greater than operator
                  * A named value is stored in a “variable”.  * print() displays a message on screen


                                                          * input() gets and returns user input

                                                          * int() converts characters to numbers
                                                          * randint() produces a random number



















                                                                                        you are here 4    35
   65   66   67   68   69   70   71   72   73   74   75