GoConqr has a new look! Let us know what you think.

Mind map

Python

julianamurciamol Spanish

Map content

Python

  1. Interactive interface vs writing scripts

    • Interactive interface
      • Is when You type directly to python one line at a time and it responds
        • Example:
          • x=2 print x y=x+2 print y
    • Writing scripts
      • Is when you enter a sequence of statements (lines) into a file using a text editor
        • Python execute the statements in the file
          • csev$ cat hello.py print 'Hello world!' csev$ python hello.py Hello world! csev$
          • Example:
    • Program steps
      • Conditional
        • Are steps that may be skipped
          • Example:
            • X=5 If x<10 Print “smaller” If x>20 Print “bigger” Print “finish”
      • Repeated
        • Have interaction variables that change each time through a loop
          • Example:
            • N=5 While n>0: Print n N=n-1 Print “blastoff”
      • Store
        • Are a set of steps to be used over and over as needed several places throughout the program
          • Example:
            • y=5 print y z=y-3 print z
  2. Reserverd words

    • Is the python vocabulary
      • They have one and only meaning to Python
        • Are different from the variables
        • The principal reserved words are:
          • And, from, not, while, as, elif, global, or, with, assert, else, if, pass, yield, break, except, import, print, class, exec, in, raise, continue, finally, is, return, def, for, lambda, try.
        • Example
          • When we train a dog, if you say, “I wish more people would walk to improve their overall health”, what most dogs likely hear is, “blah blah blah walk blah blah blah blah”; because walk is it reserved word.
  3. Types of errors

    • Syntax error
      • Is when you have violated the “grammar” rules of Python.
    • Logic errors
      • Is when your program has good syntax but there is a mistake in the order of the statements or perhaps a mistake in how the statements relate to one another.
        • Example:
          • Take a drink from your water bottle, put it in your backpack, walk to the library, and then put the top back on the bottle.
    • Semantic errors
      • Is when your description of the steps to take is syntactically perfect and in the right order, but there is simply a mistake in the program
        • It means that:
          • The program is perfectly correct but it does not do what you intended for it to do

Information

Description
Mind Map on Python, created by julianamurciamol on 25/03/2016.
Created by
julianamurciamol · Mar 2016
Updated
Mar 26, 2016
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?