Coconote
AI notes
AI voice & video notes
Try for free
đź’»
Introduction to Programming (6100L) - Lecture 1
Jul 23, 2024
Lecture Notes: Introduction to Programming (6100L)
Instructor Information
Lecturer
: Anna Bell
Experience
: Nearly 10 years in the ECS department
Course Title
: Introduction to Programming, 6100L
Lecture Overview
Course Administrative Information
High-Level Overview of Computers
Introduction to Python Basics
Course Structure & Expectations
Lectures
: Teaching, interactive coding sessions, opportunities for questions
Materials
: Download lecture slides beforehand, highly recommend following along with coding exercises
UTRI Breaks
: Breaks during lectures for hands-on coding practice
Participation & Practice
: Emphasizes the importance of actively coding and participating to learn programming skills
Learning Outcomes
Conceptual Knowledge
: Understanding computer science concepts
Programming Skills
: Gaining hands-on experience in coding
Problem-Solving Skills
: Translating problems from English descriptions to coded solutions
Course Topics
Computational Thinking
: Approach problems with computational solutions
Python Programming Language
: Basics and structuring code
Algorithms
: Intro to base algorithms
Algorithmic Complexity
: Assessing program efficiency and memory usage
Types of Knowledge
Declarative Knowledge
: Statements of fact (e.g., math definitions)
Imperative Knowledge
: Instructions or recipes (e.g., steps to compute square roots)
Example Algorithm: Computing Square Roots
Initial Guess
: Start with an arbitrary guess
Iteration
: Iterate to refine the guess
Stopping Condition
: Stop when an adequately precise value is reached
Programming Basics
Programs as Recipes
: Sequences of steps or instructions for computers
Computers’ Role
: Execute algorithms, store data, perform operations quickly
Historical Context
Fixed-Program Computers
: e.g., Pocket calculators
Stored-Program Computers
: Could store and execute instructions as data
Python Programming Language
Primitives
: Numbers, sequences of characters, operations, true/false values
Syntax
: Rules for forming valid sentences or expressions in Python
Semantics
: No ambiguity in meaning; programs have a single interpretation
Expression Evaluation
: Python evaluates expressions and stores their values, not the expressions themselves
Variables & Assignments
Variable Creation
: Binding names to values
Variable Rules
: Understanding valid assignment (e.g.,
x = 5
)
Rebinding
: Changing the value associated with a variable’s name (e.g.,
radius = radius + 1
)
Programming Constructs
Expressions
: Example
3 + 2
evaluates to
5
Types of Objects
: Integers, floats, booleans, etc.
Operations
: Addition, multiplication, division, exponentiation, etc.
Coding Practicals
Swapping Variable Values
: Using a temporary variable
Python Tutor
: Tool to step through code execution line-by-line for debugging
Key Takeaways
Evaluate Line by Line
: Python reads and executes code from top to bottom
Computers Follow Instructions
: Execute instructions exactly as given
Imperative vs Declarative Knowledge
: Focus on instructions (imperative) in computer science
Next Steps
Upcoming Lectures
: Introduction to control flow and decision-making in programs
Practice
: Continue using the shell for quick tests and debugging
Summary
Programming Basics
: Manipulating objects and understanding types
Expressions & Evaluations
: Combining objects into meaningful expressions
Assignments
: Using variables to write clear, reusable code
Importance of Practice
: Engage in hands-on coding to solidify learning
End of Lecture
Reminder
: Next session on Monday
đź“„
Full transcript