Level 2: Online Articles - IncrediCoders/Python1 GitHub Wiki
Mrs. Scratcher added this page on March 14, 2023
Here are some more helpful articles about variables, key events, and if statements! You can skip down to these sections on this page:
-
Variables in Python – Real Python - This site gives you an in depth description of the different types of code that can be written using variables. It also provides examples of each way showing both the written out code and what will be printed out after the code is run.
-
Python Variables - GeeksforGeeks - For this site, be sure to check out the "Rules for creating variables in Python" (near the top). This list is a very handy reference to remember or refer back to. It also comes with some basic examples, where you can try out some code!
-
Variables in Python - Study Tonight - This lesson leads you through some very basic examples of using variables in Python.
-
Python: Variable Types - Tutorialspoint - For this site, although the language is more advanced in this article, it does a great job at thoroughly explaining every detail about Python variables. It also provides examples of code written as well as what that code returns once it is run.
-
Python Variables - guru99.com - This site provides a description of the many ways that you can write variables, and also describes what it does. It also provides examples of code, pointing out the what each line does and how it interacts with the variable that was created.
-
Variables and Types - Learn Python - This site gives a description about what a variable is, and the many ways in can be used in code. It also provides examples of all the different types of variables, and it allows you to change the code and see what changes when the code is run!
-
Python Tutorial: What Are Variables? - CS Dojo - This video talks about how to use the print function to print out the values held in variables. It also provided an example of using variables and printing them out, and the step-by-step process on how to do that in Python.
-
Python 3 Tutorial: Variables - sentdx - In this video, he describes that variables act as placeholders for data. They can aid in short hand, as well as with logic, as variables can change, hence their name. He then provides examples of using variables in Python and that process.
-
Python Variables - Programming with Mosh - This video talks about what variables are and how to use them in Python. He gives a step-by-step example of the different functions of a variable like assigning a value to it, as well as printing that value and variable out as a part of the output.
-
Variables in Python - Telusko - In this video, he described what a variable is, as well as how to use them in Python. Then, he described an example talking about adding a string value to a variable, and also finding the length of that string when it is within the variable.
-
Python Variables - python-ds.com - This site gives you both a simple example of what a variable is and how it is used, and it also gives more complicated examples of real life use for variables. For some of the examples you can change the code and see how that changes what is printed out.
-
Python Variables - w3schools.com - This site's explanation of variables is a little more advanced, as it compares Python variables to how variables are handled in other programming languages. It also includes a tutorial for you to try out some of the lessons.
-
Keyboard events - pythonhosted.org - This site gives you the different commands that are considered "key events" where a key is pressed. It also goes more in depth than the challenges for this course talking about modifiers and how they interact with key events.
-
Pygame.key - pygame.org - This site gives you a list of all the different pygame.key commands that can be used in Python. Then, after the list, it describes what pygame.key means and where it can and should be used in code. Then, there are examples of some of the ways that pygame.key can be used.
-
Keyboard Input Events - coderslegacy.com - This site gives an in depth description of the different aspects of a key being pressed and the code that can be used to make that command. It also gives examples of code for each of those aspects and how it looks written out.
-
Pygame Programming - nerdparadise.com - This site gives a description of a few of the key event commands, as well as a brief description about what they mean. Then, at the bottom there is an example of the key events described used in a code example as well as other key events.
-
Python Turtle Graphics: Key Presses & Events - Tech with Tim - In this video he continues his tutorial on the turtle module in python. The turtle graphics module has built in functionality to listen to events and detect key presses. This allows the ability to move the turtle object via user input and create some interesting shapes.
-
Python GUI keyboard events - Bro Code - This video goes more in-depth describing the keyboard events and presses using GUI. He provides a step-by-step example of this process, and how it works specifically in Python. He also described some of the things that will not work while using GUI.
-
Keyboard Event Binding with Python Tkinter - Codemy.com - In this video, he describes how to do and write keyboard events using binding with Python in Tkinter. Binding allows us to grab keyboard and mouse events...so mouse clicks (left or right mouse clicks), keyboard presses (Say, if you pressed the q key on your keyboard) and much more.
-
Pygame.KEYDOWN Example - programcreek.com - This site gives an example of specifically the pygame.KEYDOWN function, and the code commands that work for that function. However, there are other examples as well that use other key event commands.
-
Pygame.KEYUP Example - programcreek.com - This site is the same as the previous link, this one focuses on the pygame.KEYUP command. However, just like the last one, there are other key events that are used as examples throughout the site as well.
-
Python Conditions and If Statements - w3schools.com - This site first gives a description of what an if statement is and how it can be used. Then, it gives a few examples of code commands using if statements with the printed out result below it to see what each if statement did.
-
Python If Else With Examples - pythonguides.com - This page talks about the Python if statement, if-else statement, elif statement, and also the nested if statment. It also provides examples of each of these statements in a Python program.
-
How to Use the Python if Statement - makeuseof.com - This page provides an in-depth descriptions of the different kind of if statements that can be used in Python programs. It also provides examples of these statements in Python programs and describes each section.
-
If Statements - anh.cs.luc.edu - This site gives a description of the different ways that you can use and set up an if statement. For each of these ways that this site describes, it gives a short example of the different types of code where an if statement can be used.
-
If Statements Explained - pythonbasics.org - This site gives a brief description of what an if statement is and the different ways that it can be used as a code command. It uses Boolean expressions which just means true or false, which is the most common use of an if statement. This site also talks about other conditional statements that you will use in future levels.
-
Python If Statement - beginnersbook.com - This site gives a description of what an if statement is, as well as a diagram of how an if statement works, once again using the Boolean commands. Then, it gives you some short examples of how to use if statements.
-
Python Conditional Statements - realpython.com - This site gives descriptions of all the different types of conditional statements, however it starts with just the if statement. Along with the description of an if statement, this site provides an example of code using an if statement.
-
Python's if statement explained - kodify.net - This page gives a description of what if statements are and how they are used in Python. Then, it provides written out coded examples of programs using if statements, with a description of each section that uses if statements.
-
How to Use If Else Statements in Python - CS Dojo - In this video, he describes how to use if statements and if else statements in Python. He also provides coded examples that he goes through and writes out himself that show how to use these statements in a Python program.
-
Python 3 Tutorial: If Statement - sentdex - In this video, he describes that the if statement is one of the most basic forms of logic that can be introduced into your program. The idea of the if statement is to assess whether something is the case, and, if it is, then to perform the following block of code within the statement.
-
Python: If Elif Else Statements - Programming with Mosh - In this video, he gives an in-depth description on what if-else statements are and how they work in Python. Then, he also provides an example of a program that uses these statements and what each of the parts mean.
-
If Elif Else Statement in Python - Telusko - This video gives a brief description of the different types of statements used in Python such as If, Elif, and If-Else, and also gave examples of each of these in a Python program. He describes each line and command and how they use these statements.
-
Python If Statements - Amigoscode - In this video you will learn how to work with Python if statements and the different command for it. He provides different examples of these statements being used in Python programs, and describes what they mean and what the output will be.
-
Python If Conditions with Examples - tutorialsteacher.com - This site gives a little bit of a description of what if statements are, however there are mainly examples. It shows the use of the if statement in the input area, and then under that, in the output area, it shows you the result of the code commands.
-
Python: if-statement – thispointer.com - This site gives a little bit of a description of what if statements are, however there are mainly examples. It shows the use of the if statement in the input area, and then under that, in the output area, it shows you the result of the code commands.
Next, you can check out the rest of our Level 2 resources. When you're done with Level 2, you can move on to Level 3, the Classroom Quiz!
In addition to this Online Articles page, you should check out the Level 2 Help page (if you haven't yet). We also have two challenges (to learn even more), a Learning Quiz (to test what you've learned), an Unplugged Activity, and a Rewards article:
-
Level 2: Help - This page will guide you through developing the Level 2 application, with some details that are in addition to what we're talking about in class.
-
Level 2: Challenge 1 - For this challenge, you're going to add two more introductions to your app... one for RAM & ROM (the twins presented together) and one for Amphib Ian (totaling 14 introductions). This page will guide you through the additional code that you'll need to write.
-
Level 2: Challenge 2 - This challenge will show you how to build your code using a Python list of variables, rather than an If/Else Ladder (like we used in class). This page walks you through the new code in the challenge.
-
Level 2: Learning Quiz - These questions are for a quiz you can take that will tell us what you've learned from today's assignment.
-
Level 2: Unplugged Activity - It's important to get some exercise and to think of coding from a fresh perspective. In today's Unplugged Activity, you're going to play a game with the class, in order to remember what variables are. This page will show you how to play the game!
-
Level 2: Rewards - If you're able to complete the class assignment in our book, then we want you to access this page as a reward, in order to see all the exploratory art and backstory for how we created the Class Introductions program! In addition, I provided the Apple Award emblem as a digital download, on this page. This is for you, if you completed the Level 2 program! You can print it out as an award, to physically show your progress through the book, to your family and friends!
After you're completely done with Level 2 (did you do the challenges?), then it's time to move on to Level 3! While you read through Level 3 in your book, you can check out the resources from Mrs. Codala, as she teaches you how to build the Classroom Quiz program:
Hopefully, you learned some more about variables, key events, and if statements. You'll use these lessons in all your future classes and projects. The more you learn, the easier programming becomes.
-- Mrs. Scratcher