Think Python

Descripción

A mind map of chapter 1 in the Green tea press "Think Python"
tsilvo2001
Mapa Mental por tsilvo2001, actualizado hace más de 1 año
tsilvo2001
Creado por tsilvo2001 hace alrededor de 9 años
425
16

Resumen del Recurso

Think Python
  1. Green Tea Press Chapter 1
    1. 1.1
      1. Interpreters and Compilers
        1. These are both ways of translating High level languages into lower level ones
          1. A compiler checks and translates the whole of the source code before running the program
            1. An interpreter translates and executes the souce code a chunk at a time. It translates a line then runs it
              1. Example
                1. Python is an iterpreted language because it is executed by an interpreter
                  1. There are two ways to use this interpreter: Interactive mode and Script mode. Interactive mode is on the initail window marked by >>> which is a direct way to execute code >>> 2+2 and python will respond on the next line with >>> 4 . Script mode needs a new window opened and is used for larger and more demanding scripts like a full game or etcha-sketch
          2. High Level and low level programs
            1. Higher level programs are able to work on a variety of computers with very little tweaking
              1. Python is a high level program so the computer has to go through it before it runs. Other examples are Java and C++
              2. Low level programs don't need translating
            2. 1.2
              1. What is a program?
                1. A program is a set of instructions that says how to perform a computation
                  1. The details vary per specific language but same basic principals remain. These are what a program is translated into, it doesn't matter how complicated it may be
                    1. Input: Gathering data from a keyboard, mic or other device
                      1. Output: Displaying the data on a screen or other device
                        1. Math: Simple addition, subtraction etc
                          1. Conditional execution: Looking for the IFs and BUTs within a program and following them
                            1. Repetition: Repeating an action. sometimes with slight variations
                      2. 1.3
                        1. Debugging
                          1. Debugging is the process of finding and correcting errors in you program
                            1. There are 3 types of error
                              1. Syntax Error
                                1. A syntax error is an error with the rules of a structure: (2+2) is legal, but 2+2) is not because brackets always come in pairs
                                2. Runtime Error
                                  1. Runtime error is an error that occurs after the program has started running
                                  2. Semantic Error
                                    1. A semantic error is not a problem with how you composed the program's structure it is a problem with what you wanted the program to do: so you wanted to print "Hello" but you typed print "Helo" instead that would be a semantic error
                            2. 1.4
                              1. Language types
                                1. Formal
                                  1. These were created to express a point in a clear and easily understood way
                                    1. Examples of this are mathematical notation and chemical short hand
                                      1. Maths has basic syntax rules: 2+2 = 4 is correct but 3+=4(0 isn't
                                        1. Chemical short hand also has basic syntax rules: CO is the short hand for carbon monoxide but Zz doesn't work as there is no element with the short hand of Zz
                                    2. Natural
                                      1. These are languages like English, German and French, they have evolved over time, they were NOT created over night or by one specific person
                                  2. 1.5
                                    1. The first program
                                      1. The traditional first program you should write is, in python: print "Hello, World" , this is a print statement meaning it will show Hello, World on the screen. the " in the program defines what will be displayed and the print is the output method
                                    2. 1.6
                                      1. Treating the computer right
                                        1. Many people treat a computer as though it was a real person, getting angry at it when it points out the smallest fault and viewing it as a teammate when it all seems to be going well.
                                          1. The best way to view a computer is to see it as a fellow student that has certain strengths and weaknesses: it is efficient, fast and hard working but it is pedantic and narrow minded. try to use the advantages and work around the weaknesses to get the best from your computer
                                    Mostrar resumen completo Ocultar resumen completo

                                    Similar

                                    Computing Hardware - CPU and Memory
                                    ollietablet123
                                    SFDC App Builder 2
                                    Parker Webb-Mitchell
                                    Data Types
                                    Jacob Sedore
                                    Intake7 BIM L1
                                    Stanley Chia
                                    Software Processes
                                    Nurul Aiman Abdu
                                    Design Patterns
                                    Erica Solum
                                    CCNA Answers – CCNA Exam
                                    Abdul Demir
                                    Abstraction
                                    Shannon Anderson-Rush
                                    Spyware
                                    Sam2
                                    HTTPS explained with Carrier Pigeons
                                    Shannon Anderson-Rush
                                    Data Analytics
                                    anelvr