Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 10 pages
Class notes

Computer Programming Term 2 Python Study Notes (Syntax, Loops, & Data Structures)

Document preview thumbnail
Preview 2 out of 10 pages

Description: Master your introductory computer programming and Python courses with these clear, highly detailed study notes! Covering everything from basic command-line navigation and data types to advanced loops, string manipulation, and dictionaries, this guide is built to help you ace your exams and debugging assignments. What's Covered: Programming Fundamentals: Syntax vs. semantics, variables, dynamic typing, explicit/implicit type conversions, and core operators. Control Flow & Logic: If-else statements, elif chains, boolean logic, and relational/logical operators (and, or, not). Loops & Iteration: while loops, infinite loop prevention, for loops, the range() function, and nested loops. Functions & Algorithms: User-defined functions, the def keyword, code tracing, trace tables, and algorithmic efficiency. Strings & Data Structures: String geometry, slicing, .format() templating, lists, and dictionary operations. Stop spending hours debugging syntax errors and get a clean, reliable study guide. Download your copy today and boost your grade!

Content preview

Topic/Main Idea Notes

Automation Is the process of replacing a manual step with one that happens automatically

Computer A step by step list of instructions to reach a goal is often long, complex and
Program follows a structured development cycle. Result: Executable File (.exe, .app)

Usually shorter and less complex Used to automate specific tasks quickly and it
Script uses a shorter, less structured development cycle. Examples: (Python, Javascript,
and Bash)


Syntax (The Rules for how statements are constructed. Includes order of elements, special
Grammer) (How) characters, and punctuation. “Me cookie eat.” (Bad Synntax)

Semantics (The Refers to the intended meaning or effect of the statements. Errors here are called
Meaning) (Why) Logical Errors. “Drink the sandwich.” (Bad Semantics)


Variables Used to temporarily store changeable values in programming code. Think of them
as labeled boxes.

Functions A reusable block of code that performs a specific task. You write it once and use it
many times.




Input (start) Information provided to a program by the end user. Can be text, voice, images or
(Data Flow) Biometrics

Output (end) The end result of a task performed by a program. Can be a value, report, or
(Data Flow) database entry

(#) Command prompt

How to write Also known as the Terminal or shell. This is the most basic way to interact with
code: The the computer which is direct communication and it is fast and powerful
Command Line

Notebooks Allows you to write code in “cells” or blocks. You can run one block at a time.
(Jupyter Great for data science
Notebooks)
Integrated Development Environments Which is where software development
IDEs (Vs Code) happens including Text Editor (with syntax highlighting), File Manager, Debugger,
and a Built-In Terminal

, What is Python? They are used for general purpose scripting language, used for automation and
apps, it is cross platform compatible (Win, Mac, Linux), Beginner-Friendly
(Readability)

What Python Is Not platform-specific (it works everywhere, unlike PowerShell). Not a client-side
Not?!!!!! language (it runs on servers/backend, unlike Javascript). Not purely
Object-Oriented language (It supports OOP, but can also be functional/procedural)


Platform-Specifi Languages designed for one OS. Powershell (Windows), Bash (Linux)
c

Cross-Platform Compatible with multiple operating systems. Python runs on everything

Client-Side Scripts executed in the user’s browser. Ex Javascript (web programming)
Scripting

Machine-Langua Lowest Level (Binary 1s and 0s). Communicates directly with hardware.
ge

Object-Oriented Code elements are treated as Objects with configurable properties (a form field
Programming that only accepts data)
(OOP)

Python The program that reads your Python code and translates it into computer
Interpreter instructions.

Document information

School year
3
Uploaded on
August 28, 2026
Number of pages
10
Written in
2025/2026
Type
Class notes
Professor(s)
Computer programming term 2 notes
Contains
All classes
$5.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
0
Followers
0
Items
13
Last sold
-



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions