Changes between Version 134 and Version 135 of ControlSystems/SoftwareTeam/IntroToPython


Ignore:
Timestamp:
Sep 4, 2017, 11:58:29 PM (8 years ago)
Author:
cdelgigante
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ControlSystems/SoftwareTeam/IntroToPython

    v134 v135  
    1717Python, like every programming language, has a structure.  Here are the big parts:
    1818
    19  * ''Variables'':  Things you assign to and read from.  Like in Algebra. `a="Dump Truck"` sets the variable `a` to the string "Dump Truck".   You can set them to numbers to or fancy things like lists.  They're basically the nouns.
     19 * ''Variables'':  Things you assign to and read from.  Like in Algebra. `a="Dump Truck"` sets the variable `a` to the string "Dump Truck".   You can set them to strings/text, numbers or fancy things like lists.  They're basically the nouns.
    2020 * ''Control Structures'':  These are core programming language instructions like IF this is true THEN do that….  These are a lot like grammar rules, like: use active voice, or use punctuation.  They're how you get stuff done.
    2121 * ''Functions'': These do things. They take nouns as arguments, do something, and can return nouns. In `redCar = paintCarRed(blueCar)`, `paintCarRed` is a function. They're the verbs, they do things, and they take variables and return variables.  Many functions are built in to Python, but you can (and should) create your own.