Get started
Computer science & ITBeginnerEnglish

Python for Everyone: Your First Programs

Learn to write real Python 3 programs from scratch: variables, decisions, functions and loops, no maths needed.

SpecioOfficial Specio courseNew course · v1
What you'll learn
  • Explain what a program is and how a computer runs Python code line by line
  • Install Python 3, write programs in a text editor and run them from the terminal
  • Store and calculate data with variables, expressions and type conversions
  • Write programs that make decisions with if, elif and else, and recover from bad input with try and except
  • Use built-in functions and define your own functions with parameters and return values
  • Repeat work with while and for loops, using break and continue to control them
  • Apply loop idioms to count, sum, average, filter, search and find the largest and smallest value
  • Read a problem, plan the steps in plain words and build a working program in small tested pieces
This course is for anyone who has never written a line of code but is comfortable using a computer. You will start with why programming is worth learning and how a computer actually follows instructions, then set up Python 3 and write your very first program. Step by step, you will learn to store information in variables, calculate with expressions, make decisions with if statements, handle bad input gracefully, package code into functions, and repeat work with while and for loops. Every lesson is a short reading with worked examples built from everyday situations such as shopping receipts, step counters, grades and temperatures, plus a Try it exercise, a list of common mistakes and quick check questions. Each module ends with a quiz and a hands-on programming assignment with exact sample input and output, so you always know what a correct program looks like. By the end you will have the four basic patterns that every program is built from, and you will be ready for the next steps: strings, files, lists and dictionaries.

Course content

7 chapters · 47 items · 11h 47m · 4 free preview items
1 · Why We Program5 items · 1h 10m
  • 1.1 Welcome: How This Course WorksPreview · 15 min
  • 1.2 Why Learn to Program?Preview · 14 min
  • 1.3 Inside the Computer: CPU, Memory, Storage and Input/OutputPreview · 13 min
  • 1.4 Python as a LanguagePreview · 13 min
  • 1.5 Quiz: Why We Program15 min
2 · Setting Up Python8 items · 1h 58m
  • 2.1 Running Python Right Now: The Online Playground14 min
  • 2.2 Installing Python 3 on Windows and macOS13 min
  • 2.3 Choosing a Text Editor12 min
  • 2.4 Running a .py File from the Terminal11 min
  • 2.5 Troubleshooting Common Install Problems12 min
  • 2.6 Taking a Screenshot of Your Output11 min
  • 2.7 Quiz: Setting Up Python15 min
  • 2.8 Assignment: Your First Personal Program30 min
3 · Your First Python Program5 items · 1h 20m
  • 3.1 Python's Vocabulary: Words, Names and Statements16 min
  • 3.2 Writing Paragraphs of Code: Scripts and the Four Patterns15 min
  • 3.3 Walkthrough: Hello World and Submitting Your Program14 min
  • 3.4 Quiz: Your First Python Program15 min
  • 3.5 Assignment: Hello World With a Twist20 min
4 · Variables and Expressions9 items · 2h 9m
  • 4.1 Variables: Names for Values14 min
  • 4.2 Numeric Expressions and Operator Precedence12 min
  • 4.3 Types and Type Conversion12 min
  • 4.4 Reading Input: input(), int() and float()12 min
  • 4.5 Comments: Notes for Humans11 min
  • 4.6 Your First Input-Process-Output Program11 min
  • 4.7 Worked Exercise: Building a Pay Calculator12 min
  • 4.8 Quiz: Variables and Expressions15 min
  • 4.9 Assignment: Pay Calculator30 min
5 · Conditional Code6 items · 1h 35m
  • 5.1 Making Comparisons: True, False and the if Statement15 min
  • 5.2 Two-Way and Multi-Way Decisions: else and elif12 min
  • 5.3 Handling Bad Input with try and except12 min
  • 5.4 Worked Exercise: Overtime Pay with Error Handling11 min
  • 5.5 Quiz: Conditional Code15 min
  • 5.6 Assignment: Score to Grade30 min
6 · Functions6 items · 1h 38m
  • 6.1 Using Built-in Functions14 min
  • 6.2 Building Your Own Functions with def13 min
  • 6.3 Parameters, Arguments and Return Values13 min
  • 6.4 Worked Exercise: Refactoring Pay into compute_pay13 min
  • 6.5 Quiz: Functions15 min
  • 6.6 Assignment: compute_pay Function30 min
7 · Loops and Iteration8 items · 1h 57m
  • 7.1 Repeating Steps with while16 min
  • 7.2 Definite Loops with for12 min
  • 7.3 Loop Idioms: Count, Sum, Average, Filter, Search11 min
  • 7.4 Finding the Largest and Smallest Value11 min
  • 7.5 Worked Exercise: Total, Count and Average11 min
  • 7.6 What's Next: Your Four Patterns and Beyond11 min
  • 7.7 Quiz: Loops and Iteration15 min
  • 7.8 Assignment: Highest and Lowest30 min
Instructor
SpecioOfficial Specio courseProgramming · IT · Data · Business

Courses written and maintained by the Specio team.