Mit6 100l f22 Rec01
Mit6 100l f22 Rec01
S061: Recitation 1
8 September 2022
1
Agenda
• Administrative Items
• Lecture Recap
• L01 - Intro to Python knowledge & fundamental concepts
2
Administrative Items | Problem Sets
3
Administrative Items | Finger Exercises
4
Administrative Items | Check Offs
• Starting with PS1, you need a checkoff for each pset (generally worth 30% of
your overall pset grade)
• Go through your code with a TA or LA, and answer some simple questions
about the pset. Score is based on code style and understanding of the pset
code
• Carefully check due date of Checkoff for each p set
• Late days cannot be used for checkoffs
• The queue gets long around the checkoff deadline, so get them done early!
5
Intro to Python | Python
6
Lecture 1 Recap: Intro to Python + Fundamental Programming Concepts
• Python programs
• Set of instructions telling the computer exactly what to do.
• Can be run from a script (e.g script1.py) or directly from the console
• Each line of code is executed in the order it’s written in.
• It’s good practice to write tidy code & comments.
• Objects
• Programs manipulate data objects.
• Typically define an object with a variable name (e.g my_name = “Nicole”)
• Each object has a type (e.g. string, list, integer, float, boolean etc…)
• Scalar objects cannot be subdivided.
• Non-scalar objects have an internal structure that can be assessed.
• The type defines what you can do with the object
7
Lecture 1 Recap: Intro to Python + Fundamental Programming Concepts
• Operations & Expressions
• Operations are carried out on objects (what operations are valid is controlled by object
type)
• Expressions are formed by a combination of operations and objects.
• Complex & long expressions often evaluate to one value.
8
Example Code
9
MITOpenCourseWare
https://ocw.mit.edu
For information about citing these materials or our Terms ofUse,visit: https://ocw.mit.edu/terms.
10