Python Core
Start coding from scratch: from print and variables to functions, files and simple classes.
For complete beginners, including curious school students. You only need a browser and a willingness to try things yourself.
50 lessons in five modules. Each lesson has short notes with an example, guided typing practice and an independent task. A 20-question exam follows the modules.
What you will learn
- Explain how a program stores numbers and text and displays a result.
- Use if statements and loops, and collect data in lists and dictionaries.
- Write functions, handle errors, and solve simple problems involving files and classes.
- Read a small program, find a mistake and check your own result.
Module path
- IntroductionFirst commands, variables and clear output.
- Confident startInput, strings, lists and your own functions.
- More opportunitiesDecisions, loops and repeated actions.
- Your own programsDictionaries, files and error handling.
- Convenient codeClasses and a small program built from familiar parts.
Your result
By the end you can build a small console program and take an exam covering every module. Homework answers stay hidden; you can correct and resubmit your work.
What comes next
This covers Python foundations. Take the VS Code course to work with real files on your computer; websites, libraries and larger projects come later.
Introduction
First commands and small programs
- Lesson 1. First outputHow to show text · 8 мин →
- Lesson 2. VariablesNumber box · 10 мин →
- Lesson 3. StringsPut words together · 10 мин →
- Lesson 4. Multiplication.Think faster. · 11 мин →
- Lesson 5. ConditionsIf not. · 13 мин →
- Lesson 6. ListsA few things together · 10 мин →
- Lesson 7. List elementHow to get one thing · 11 мин →
- Lesson 8. Repeatsfor loop · 12 мин →
- Lesson 9. FunctionsA command named · 12 мин →
- Lesson 10. Mini-projectList and loop together · 15 мин →
Confident start
Input, inspections and their tools
- Lesson 11. Introduction of textThe program asks a question. · 11 мин →
- Lesson 12. Number from responseTurn the text into a number · 12 мин →
- Lesson 13. Fractional numbersWhen the whole is small · 11 мин →
- Lesson 14. Truth or falsehoodHow the comparison works · 11 мин →
- Lesson 15. Two conditions at once.and · 13 мин →
- Lesson 16. while loopRepeat while you're right. · 13 мин →
- Lesson 17. Length of listSo many things. · 10 мин →
- Lesson 18. Add to the listMethod of append · 11 мин →
- Lesson 19. DictionaryLooking by name. · 12 мин →
- Lesson 20. Function with responseArgument and return · 15 мин →
More opportunities
New conditions, collections and loop management
- Lesson 21. Another choice.elif between if and else · 12 мин →
- Lesson 22. At least one.or · 10 мин →
- Lesson 23. On the contrary.not · 10 мин →
- Lesson 24. Dividing remainderMark. · 11 мин →
- Lesson 25. Stop the loopCommand break · 12 мин →
- Lesson 26. Skip a stepCommand continue · 12 мин →
- Lesson 27. Piece of listSlices · 11 мин →
- Lesson 28. Immutable groupTuple · 10 мин →
- Lesson 29. Just different things.A set of set · 11 мин →
- Lesson 30. Update the dictionary.Change the key. · 12 мин →
Your own programs
Errors, files and final project
- Lesson 31. Is there an element?Testing in · 10 мин →
- Lesson 32. Number and elementFunction enumerate · 12 мин →
- Lesson 33. New list quicklyList generator · 13 мин →
- Lesson 34. When the mistake happened.try and except · 13 мин →
- Lesson 35. Write the file down.with open and write · 14 мин →
- Lesson 36. Read the file.Mode r and read · 13 мин →
- Lesson 37. Finished moduleimport math · 11 мин →
- Lesson 38. The default argumentConvenient function · 12 мин →
- Lesson 39. SortingFunction sorted · 10 мин →
- Lesson 40. Outcome draftCount the purchases. · 18 мин →
Convenient code
Working with text, dictionaries and objects
- Lesson 41. Small letters.Method of lower · 9 мин →
- Lesson 42. Extra gapsMethod of strip · 9 мин →
- Lesson 43. Split the sentence.Method of split · 10 мин →
- Lesson 44. Gather words.Method of join · 11 мин →
- Lesson 45. The key may not be.Method get in the dictionary · 10 мин →
- Lesson 46. All dictionary pairsMethod of items · 12 мин →
- Lesson 47. Two inputs to functionA few arguments · 11 мин →
- Lesson 48. Your type of dataClass and object · 13 мин →
- Lesson 49. Name for each objectMethod of __init__ · 15 мин →
- Lesson 50. Bottom line: cat saysMy method in class. · 18 мин →