Changes between Version 22 and Version 23 of ControlSystems/SoftwareTeam/IntroToPython
- Timestamp:
- Sep 4, 2017, 5:26:34 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ControlSystems/SoftwareTeam/IntroToPython
v22 v23 15 15 Python, like every programming language, has a structure. Here are the big parts: 16 16 17 * ''Variables'': Things you assign to and read from. Like in Algebra. A="Dump Truck" sets the variable A to the string "Dump Truck". They're basically the nouns.17 * ''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. 18 18 * ''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. 19 19 * ''Control Structures'': These are instructions like IF this is true THEN do that…. These are like grammar rules, like use active voice, or use punctuation.