Python First Steps: Fundamentals and Core Concepts
Topic: Software Development
Learning a programming language is like learning a foreign (human) language: it requires not just a new mindset but also lots of practice. But if you’ve never programmed before, it’s like learning a foreign language without first knowing what nouns and verbs are.
No wonder learning to program frustrates so many people—you’re trying to scale two ladders at once, learning new syntax and new fundamental concepts at the same time. Moreover, since many classes are aimed at people who have previously used another programming language, the pace of such classes isn’t appropriate for people just starting on their programming journey.
Take your first steps as a programmer, at a pace and with content aimed squarely at people who haven’t coded before. (Or who may have taken a university course and decided that coding wasn’t for them.) Expert Reuven Lerner walks you through using Python, a widely used language that’s famous for its relatively shallow learning curve. You’ll learn to write real programs—small and simple programs, but real ones nonetheless—using the same techniques and syntax professional developers use every day in commercial and open source projects all over the world. And you’ll gain insight into some of the decisions that programmers have to make every day as they design the software we all use.
What you'll learn-and how you can apply it
By the end of this live online course, you’ll understand:
- The role of variables in programs
- What it means to have a “Boolean expression”
- What sorts of comparisons you can use in programming
- How to gather input and produce output
- The importance of “if” statements
- What sorts of errors users can make
- The differences between Boolean, string, and integer values
- The basic syntax and structure of Python programs
And you’ll be able to:
- Assign values—including from the user—to variables
- Use Python’s “input” and “print” functions for basic input and output
- Compare values using ==, !=, <, and >
- Make decisions using “if” statements
- Combine comparisons with “and” and “or”
- Write Python programs that get input from the user, make decisions, and produce output
- Run Python programs that you’ve written
This training course is for you because...
- You haven’t ever programmed before, and you need to learn the basics.
- You’re a system or network administrator who wants to automate your job beyond simple scripts with Python but aren’t sure where to start.
- You manage developers and would like to have a better idea of what they do.
- You use Excel in your work and would like to use pandas—but first need to learn how to program in Python.
- You want to become a developer or data scientist, and know that Python is a major player, but aren’t sure where to start with development.
- A Google Colab account (with a new Google Colab notebook created and ready)
- Read “1 Thinking Computationally: Getting Started” (chapter 2 in Head First Learn to Code)
- Read Introducing Python, second edition (book)
About your instructor
Reuven M. Lerner is a full-time Python trainer. In a given year, he teaches courses at companies in the United States, Europe, Israel, India, and China — as well as to people around the world, via his online courses.
Reuven created one of the first 100 Web sites in the world just after graduating from MIT’s computer science department. He opened Lerner Consulting in 1995, and has been offering training services since 1996. Reuven’s monthly column appeared in Linux Journal from 1996 until the magazine’s demise in 2019. He is a panelist on the soon-to-be launched “Business of freelancing” podcast, after five years as a panelist on the Freelancers Show podcast from 2015-2019.
Reuven’s most recent book is “Python Workout,” a collection of Python exercises with extensive explanations, published by Manning.
Reuven’s free, weekly “Better developers” newsletter, about Python and software engineering, is read by more than 15,000 developers around the globe. His “Trainer weekly” newsletter is similarly popular among people who give corporate training.
Reuven has a bachelor’s degree in computer science and engineering from MIT, and a PhD in learning sciences from Northwestern University. He lives in Modi’in, Israel with his wife and three children.
The timeframes are only estimates and may vary according to how the class is progressing
What’s a programming language? What’s Python? (15 minutes)
- Presentation: What programming languages help us do; why there are so many; where Python fits into this constellation; why Python is so popular today
Using Jupyter (15 minutes)
- Presentation: Jupyter overview; basic use and navigation; running code; editing code; getting results
Basic ints and strings, assignment, variables, and + (25 minutes)
- Presentation: Data and data types; variables; assigning to variables; why different data types are different; expressions
- Hands-on exercises: Create a simple calculator; create a simple greeting
Break (5 minutes)
Input from the user, “input” always returns a string, assigning to a variable, printing, and simple f-strings (30 minutes)
- Presentation: Using the “input” function to get input from the user; assigning that input to a variable; printing strings
- Hands-on exercise: Display friendly greetings
== and expressions, True and False, comparisons with < and >, and if/else (25 minutes)
- Presentation: Comparing two values in Python; comparing with ==, <, and >; the structure of an “if” statement; indentation; the “else” clause
- Hands-on exercise: Determine which word comes first
Break (5 minutes)
Elif and alternatives; “or,” “and,” and “not” (30 minutes)
- Presentation: More complex comparisons with “elif” clauses; logical alternatives with “and,” “or,” and “not”
- Hands-on exercise: Complete name and city exercise
== and numeric expressions, True and False, and if/else (25 minutes)
- Presentation: Turning strings into numbers; comparing numbers; numbers in “if/else” expressions
- Hands-on exercise: Complete the number guessing game
Break (5 minutes)
Creating strings and retrieving from strings with indexes and slices (30 minutes)
- Presentation: Grabbing parts of a string with an index or slice; using “in” to search in a string
- Hands-on exercise: Grab a piece of a string
Final project (25 minutes)
- Discussion: Final hands-on exercise
- Hands-on exercise: Complete Pig Latin exercise