from Guide to Skillshare
Coding 101 - Python for Beginners
Hello there! Welcome to the resources page for the Skillshare Coding 101 class. For each lesson, follow these steps:
-
Watch the corresponding lesson first.
- If your in-lesson code doesn't work, see my code in In-Lesson Code. You can usually find the mistake by just comparing my code with yours, character for character.
- If you would like to take notes, see the Slides. The "Recap" slide is a good cheat sheet.
-
Review the text summary. You should understand what the summary means, but you don't need to memorize it. Summaries here ae made to just jog your memory.
-
Complete exercises to practice coding.
- For Self-Guided Exercises, click on the Exercises link and do your best! These are "open book"; refer freely to course resources. See answers and explanations in Solutions.
- For Guided Exercises, follow along with the video. If need be, see Exercises or Solutions.
Expressions
- Code along with interactive video lesson "3. Expressions". Slides, In-Lesson Code.
- Read summary: There are four data types in Python: integer, float, string, boolean. There are also several categories of operators: arithmetic, comparison and boolean operators. Combining data and operators gives us expressions.
- Try self-guided exercises. Exercises, Solutions
Variables
- Code along with interactive video lesson "4. Variables". Slides, In-Lesson Code.
- Read summary: Variable names can contain numbers, letters, and underscores but can't start with a number. Variables can be assigned to any expression, using an equal sign, like x = 5.
- Code along with guided exercises in "5. (Bonus) Guided Exercises for Variables". Exercises, Solutions
- Try self-guided exercises: Exercises, Solutions
Calling Functions
- Code along with interactive video lesson "6. Calling Functions". Slides, In-Lesson Code.
- Read summary: Call functions using the function name, parentheses, and any input arguments, such as round(3.14).
- Code a nifty tool in "7. Project: Currency Converter". Finished Code
- Try self-guided exercises: Exercises, Solutions
Calling Methods
- Code along with interactive video lesson "8. Calling Methods". Slides, In-Lesson Code.
- Read summary: Call methods using the object, dot notation, method name, parentheses, and any input arguments, such as text.upper().
- Code a nifty tool in "9. Project: Email Reformatter". Finished Code
- Try self-guided exercises: Exercises, Solutions
Lists
- Code along with interactive video lesson "10. Lists". Slides, In-Lesson Code
- Read summary: Define lists using square brackets and commas, like [1, 2, 3]. Get an item from the list by using square brackets and the index, such as numbers[0]. Remember that the first item corresponds to the index 0, which we call "zero-indexing".
- Code a nifty tool in "11. Project: Name Picker". Finished Code
- Try self-guided exercises: Exercises, Solutions
Dictionaries
- Code along with interactive video lesson "12. Dictionaries". Slides, In-Lesson Code.
- Read summary: Define dictionaries using curly braces. Separate keys from values with colons, and separate key-value pairs using commas, like {'Mary': 1, ‘Bob': 2}. Get a value from the dictionary using square brackets and the key, such as names_to_counts['Mary'].
- Code a nifty tool in "13. Project: Location Checker". Finished Code
- Try self-guided exercises: Exercises, Solutions
- Code along in "14. (Bonus) Guided Exercises for Collections": Exercises, Solutions
- Code along in "15. (Bonus) Guided Exercises for Using Functions": Exercises, Solutions
If-Else Statements
- Code along with interactive video lesson "16. If statements". Slides, In-Lesson Code
- Read summary: Execute code if a statement is true using an "if", a condition and a colon. For the code to conditionally execute, make sure to add four spaces before every line.
- Code a nifty tool in "17. Project: Birthday Countdown". Finished Code
- Try self-guided exercises: Exercises, Solutions
While Loops
- Code along with interactive video lesson "18. While Loops". Slides, In-Lesson Code
- Read summary: Execute code repeatedly while a statement is true, using "while", a condition and a colon. For the code to repeatedly execute, make sure to add four spaces before every line.
- Code a nifty tool in "19. Project: Bacon Ipsum". Finished Code
- Try self-guided exercises: Exercises, Solutions
For Loops
- Code along with interactive video lesson "20. For Loops". Slides, In-Lesson Code
- Read summary: Execute code repeatedly for every item in an iterable, using "for", the variable to assign to each item, the iterable, and a colon. For the code to repeatedly execute, make sure to add four spaces before every line.
- Code a nifty tool in "21. Project: Generate Password": Finished Code
- Try self-guided exercises: Exercises, Solutions
Defining Functions
- Code along with interactive video lesson "22. Define Functions". Slides, In-Lesson Code
- Read summary: Define a function using "def", the function name, parentheses, and the input argument names. For the code that belongs to the function, make sure to add spaces before every line.
- Code a nifty tool in "23. Project: Secret Messages". Slides, Finished Code
- Try self-guided exercises: Exercises Only, Solutions
- Code along in "24. (Bonus) Guided Exercises for Defining Functions": Exercises (Text, Starter Code), Solutions
- Code along in "25. (Bonus) Guided Exercises for If, While": Exercises, Solutions
- Code along in "26. (Bonus) Guided Exercises for For Loops": Exercises, Solutions
Conclusion
- Watch the final conclusion video "27. Conclusion".
- Try the final, challenging set of self-guided exercises: Exercises, Solutions
- Modify one of the tools we built in this class, and post your project!
- I would love it if you could leave a review for the course! Any feedback you could leave for me would be extremely helpful.
If you're interested in specific applications of code, try my introductions to artificial intelligence, computer vision or databases. You can also learn how to build desktop applications and web applications in my Guide to Hacking.
Want more tips? Drop your email, and I'll keep you in the loop.