0% found this document useful (0 votes)
13 views43 pages

Python Programming Basics Overview

The document outlines a module focused on the relationship between computer hardware and software, including the installation of Python and understanding of basic data types and error types in programming. It covers the evolution of electronic computers and the significance of programming languages, particularly Python. Additionally, it highlights the importance of integrated development environments (IDEs) and the types of errors that can occur in programming.

Uploaded by

leescott101
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views43 pages

Python Programming Basics Overview

The document outlines a module focused on the relationship between computer hardware and software, including the installation of Python and understanding of basic data types and error types in programming. It covers the evolution of electronic computers and the significance of programming languages, particularly Python. Additionally, it highlights the importance of integrated development environments (IDEs) and the types of errors that can occur in programming.

Uploaded by

leescott101
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Module Overview

|Module Learning Objectives


|1. Describe the relationship between
computer hardware and software.
Module Overview
|Module Learning Objectives
|2. Explain the relationship between
low-level machine instructions and
high-level programming languages.
Module Overview
|Module Learning Objectives
|3. Install Python and an integrated
development environment (IDE).
Module Overview
|Module Learning Objectives
|4. Identify the basic data types and
error types in Python programs.
Module Overview
|Module Learning Objectives
|5. Write a simple Hello World program
in Python.
Module Overview
Hardware & Software
Hardware & Software
|Computer
Hardware & Software
|Computer
Hardware & Software
|Computer
Hardware & Software
|Computer
Hardware & Software
|Computer
|Computer
|A programmable machine that
processes raw data into useful
information.
Hardware & Software

|General purpose machine or a


universal machine.

|Hardware and software.


|Data & Information
|Data is raw, unorganized facts.

|Information is processed data which is


Hardware & Software

organized, structured, and presented


in a context to make it useful.

|Information = Data + Processing


|Example
|Data: Individual student test scores.
Hardware & Software

|Information: The average score of a


class.
Hardware & Software
|Information Processing Cycle
|Binary
|Base 2 Number System

|1’s and 0’s


Hardware & Software

|On/Off
|True/False
|Change in voltage
|Bits and Bytes
|Bit – Binary Digit

|Byte – 8 bits (ASCII)


Hardware & Software

|Kilobyte (KB), Megabyte (MB),


Gigabyte (GB), Terabyte (TB), Petabyte
(PB), Exabyte (EB), Zettabyte (ZB),
Yottabyte (YB)
|Hardware
|Physical devices.

|Mechanical computers vs. electronic


Hardware & Software

computers.
|Electronic Computers
|1st gen: 1940 – 1956
|Vacuum tubes
Hardware & Software
|Electronic Computers
|2nd gen: 1957 - 1963
|Transistors
Hardware & Software
|Electronic Computers
|3rd gen: 1964 – 1971
|Integrated circuits
Hardware & Software
|Electronic Computers
|4th gen: 1972 – present
|Microprocessors/CPUs
Hardware & Software
|Electronic Computers
|5th gen: 2010 – present
|AI, Quantum, Nanotech, etc.
Hardware & Software
|Moore’s Law
|Number of transistors in an IC would
double about every two years.
Hardware & Software
|Software
|A set of instructions that tells the
computer hardware how to perform
specific tasks.
Hardware & Software
Programming Languages
|Python
|An interpreted, object-oriented, high-
Programming Languages

level, dynamically typed, general-


purpose programming language.
|IDE
|Integrated Development Environment
Programming Languages

|An application that provides tools for


computer programmers to aid in
software development activities.

|Source code editor, build/run tools,


debugger, plugins.
Programming Languages
|Thonny
|Source Code
|Instructions/commands that we
Programming Languages

(humans) write in a programming


language.

|Compiled or interpreted into an


executable computer program.
Programming Languages
|Source Code
|Python Data Types
|Numbers: Integers, Floats, Complex
Programming Languages

|Sequences: Strings, lists, tuples

|Sets and frozensets

|Dictionaries

|And more.
|Error Types
|Syntax
Programming Languages

|Runtime

|Logic
|Syntax Errors
|AKA – compile time errors.
Programming Languages

|Prevents the program from running.

|Easiest to find and fix.

|Violation of the rules for how Python


statements must be written.
Programming Languages
|Syntax Error Example
|Runtime Errors
|These don’t violate the syntax rules.
Programming Languages

|Throw exceptions that stop the


execution of the program.

|Exceptions need to be handled so the


program does not crash.
Programming Languages
|Runtime Error Example
|Logic Errors
|Most difficult to find and fix.
Programming Languages

|Produce incorrect/wrong results


(output).
Programming Languages
|Logic Error Example

You might also like