
Learn the absolute basics of Python, from installation and setup to variables, data types, loops, and functions, then explore object oriented programming and AI tool integration with OpenAI APIs.
Install the Sublime Text editor and the Git Bash terminal to prepare your coding environment for this course. Download and install these tools with default settings to start writing Python.
explains how to use Python comments, including # and triple-quoted blocks, to document code and explain logic, and demonstrates clearing the screen with the os module.
Learn how variables hold a single value in Python using assignment, with examples like first_name as a string and print statements. Understand naming conventions, underscores, lowercase, and case sensitivity.
Explore strings in Python, including single or double quotes, escaping with backslashes, new line and tab characters, and embedding variables with f-strings for printing.
Explore basic math operations in Python, including addition, subtraction, multiplication, division, exponents, and modulus, and understand order of operations with pemdas, plus floats and integers.
Explore Python lists, or arrays, that can store strings, numbers, booleans, dictionaries, or other lists, with zero-based indexing and methods like append, pop, remove, and del.
Learn how tuples differ from lists, including immutability and how to create new tuples by combining or slicing, with examples of single-item tuples and zero-based indexing.
Explore dictionaries in Python by using key-value pairs, updating and removing entries in a sample fave_pizza dictionary, and combining strings, numbers, and lists.
Explore Python comparison operators: equal to, not equal, greater than, less than, greater than or equal to, and less than or equal to, returning booleans for conditional statements.
Master conditional statements in Python to drive program logic with if, elif, and else. Use variables, comparison operators, and proper indentation to control flow.
Learn how the Python while loop repeats actions while x is less than ten, printing values and incrementing x to avoid infinite loops.
Learn how to use for loops to iterate lists, dictionaries, and strings, printing items and key-value pairs with examples like names and favorite pizzas.
Learn how to define and call functions in Python using def, pass parameters, and print results, with examples of names and simple arithmetic.
Learn to replace printing inside a function with returning values, then assign and manipulate those results in Python using variables and string methods like upper or title.
Implement a square class with an initialization that stores the side length, add an area method returning self.side_length squared, and discuss printing versus returning values.
construct a square class with area and perimeter methods, create a report showing side length, area, and perimeter, and compare object oriented and functional programming approaches.
Learn to capture user input in Python with the input() function, assign it to a variable, and print a personalized greeting using an f-string.
The new version of OpenAI may throw an error. Use the version I used in the last video. To do so:
pip uninstall openai
and reinstall the old version:
pip install openai==0.26.3
Learn to parse an OpenAI API response by navigating nested dictionaries and lists to extract the content from the message, starting with the choices key and the zeroth item.
The World Economic Forum says that Artificial Intelligence will replace over 85 Million Jobs by the year 2025. Don't get left behind! It's time to up your skill set with something that will allow you to leverage AI and thrive!
Welcome to Intro To Python Programming For Artificial Intelligence!
Aimed at the absolute beginner, I'll teach you the Python Programming Language from the ground up. We'll start by downloading and Installing Python, and setting up a development environment.
Next I'll teach you the absolute beginnings of Python, things like:
Variables
Comments
Data Types
String Manipulation
Simple Math
After that we'll move into more intermediate topics, things like:
Assignment Operators
Lists
Tuples
Dictionaries
Comparison Operators
Conditional Statements
While Loops
For Loops
Functions
Then we'll move into more advanced topics such as
Object Oriented Programming
Classes
Finally at the end of the course we'll start to ease into Artificial Intelligence. I'll talk about OpenAI, the makers of ChatGPT. We'll sign up for an OpenAI account, and explore their API.
We'll build a simple Python program that connects to the OpenAI API and allows us to ask their AI questions and get answers.
Now is the time to learn an in-demand skill that will put you on the path to understanding and leveraging AI to work for you and not against you!
See you on the inside!
-John Elder