This document outlines a Python programming course focused on Python basics, including computer organization, the importance of programming languages, and an introduction to Python. It covers topics such as Python implementations, code execution, installation, and writing a first program. The document also includes a recap of the class and homework assignments for practice.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
3 views15 pages
Python Basics Lecture 1
This document outlines a Python programming course focused on Python basics, including computer organization, the importance of programming languages, and an introduction to Python. It covers topics such as Python implementations, code execution, installation, and writing a first program. The document also includes a recap of the class and homework assignments for practice.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15
Welcome to Python Programming
• Course: Python Foundation
• Topic: Python Basics • Instructor: [Your Name] • Tagline: Learn Python from scratch — the right way! What You’ll Learn Today • • I/O Devices, CPU, and Memory • • Computer Organization Basics • • Why Programming Languages • • Introduction to Python • • Implementations of Python • • How Python Executes Code • • Installing Python & Running Programs • • Comments in Python Understanding the Core Parts of a Computer • Diagram: • [Input Devices] → [CPU + Memory] → [Output Devices] • ↑ • [Storage Devices] Why Programming Languages? • • We need a way to talk to computers • • Programming languages = instructions • • Python = simple, readable, beginner-friendly What is Python? • • High-level, interpreted language • • Created by Guido van Rossum (1991) • • General-purpose: web, data science, AI • • Syntax close to English Python in the Real World • Examples of companies using Python: • • Google • • NASA • • Instagram • • Netflix • • Dropbox Types of Python Implementations • • CPython – Standard and most used • • Jython – Runs on Java • • IronPython – For .NET • • PyPy – Faster with JIT How Python Executes Code • Execution Flow: • Your Code (.py) → Python Interpreter • → Byte Code (.pyc) → Python Virtual Machine (PVM) → Result Key Python Terms • • Interpreter • • Script • • IDLE • • REPL (Read-Eval-Print Loop) Installing Python • 1. Go to https://www.python.org • 2. Download Python (Latest) • 3. Install it • 4. Verify with: python --version Write Your First Python Program • # hello.py • print("Welcome to Python Programming!") • Run with: python hello.py Comments in Python • # Single-line comment • ''' • This is a multi-line comment • ''' Recap of Today’s Class • • CPU, Memory, and I/O • • Why Python • • Install & Setup • • First Python Program • • Python Comments Homework / Practice • • Install Python • • Write and run your first program • • Use comments (single & multi-line) • • Try printing your name Next Lecture: Variables & Data Types • • Declaring variables • • Numbers, strings, lists • • Type conversion