← Courses
LANG PY · 3 credits
Course Outline
Python for Beginners
Build Python properly from zero: values and types, strings, numbers and input, conditionals, loops, lists, dictionaries, tuples, sets, functions, and error handling, capped with three mini-projects (number guessing, word counter, gradebook) that combine everything into complete programs.
What you will learn
- ✓Read and write Python that uses every core type: int, float, str, bool, list, dict, tuple, and set
- ✓Slice, search, and transform strings with indexing, methods, and f-strings
- ✓Control program flow with elif chains, logical operators, truthiness, for/range, while, break, and continue
- ✓Apply the four loop patterns (sum, count, find, build) to solve problems over any collection
- ✓Decompose problems into functions with parameters and return values, and reason about variable scope
- ✓Read a traceback to locate a bug, and use try/except to handle bad input gracefully
- ✓Avoid the classic traps: float rounding error, list aliasing, sort() returning None, and input() always returning a string
Course outline
Unit 1Values, Print, and Arithmetic
- 1-1Values and Types4 checks · 9 min
- 1-2Variables and Comments4 checks · 10 min
- 1-3Arithmetic, Precisely5 checks · 11 min
Unit 2Strings, Deeply
- 2-1Indexing and Slicing4 checks · 12 min
- 2-2String Methods5 checks · 12 min
- 2-3f-strings: Building Text4 checks · 10 min
Unit 3Numbers and Input
- 3-1int, float, and Conversion5 checks · 10 min
- 3-2Reading Input4 checks · 11 min
- 3-3Floats Are Approximate3 checks · 9 min
Unit 4Conditionals, Mastered
- 4-1if, elif, else4 checks · 11 min
- 4-2and, or, not4 checks · 10 min
- 4-3Truthiness and Nesting4 checks · 11 min
Unit 5Loops, Mastered
- 5-1for and range4 checks · 11 min
- 5-2while, break, continue4 checks · 11 min
- 5-3The Four Loop Patterns4 checks · 13 min
- 5-4Nested Loops4 checks · 10 min
Unit 6Lists
- 6-1Creating and Changing Lists5 checks · 11 min
- 6-2Growing and Shrinking Lists3 checks · 10 min
- 6-3Working Over a Whole List5 checks · 12 min
- 6-4Two Names, One List3 checks · 9 min
Unit 7Dictionaries, Tuples, and Sets
- 7-1Dictionaries: Looking Things Up by Name4 checks · 12 min
- 7-2Dict Iteration and Tuples4 checks · 11 min
- 7-3Sets and Choosing the Right Container4 checks · 11 min
Unit 8Functions
- 8-1Defining and Calling Functions4 checks · 13 min
- 8-2return, Precisely4 checks · 11 min
- 8-3Scope and Decomposing Problems3 checks · 12 min
Unit 9Errors and Robustness
- 9-1Reading a Traceback4 checks · 11 min
- 9-2try / except4 checks · 11 min
- 9-3Retry Until Valid4 checks · 10 min
Unit 10Mini-Projects: Putting It All Together
- 10-1Project: Number Guessing Game4 checks · 12 min
- 10-2Project: Word Counter4 checks · 13 min
- 10-3Project: Gradebook4 checks · 13 min
Practice while you learn
Use Hack University's public online code editor when you want to run code online before committing to the full curriculum. The browser compilers are free for quick syntax checks, exercises, and interview practice in an isolated sandbox environment.