Written by Kanyon Pierce
I have been coding with a language called BASIC since the 7th grade. I have recently started using a coding language called Python. I can tell you that contrary to popular belief, coding is pretty simple. If you want to learn how to code, we are going to start from the very basics.
What is code?
Code is a set of instructions for the computer to carry out. You may have seen the pictures with a bunch of 1’s and 0’s but that is not what software developers use. We use types of code (called languages) that are understandable by humans, our languages are then converted to instructions for the computer.
How do computers understand our code?
Have you ever had to write procedures for a lab? Computers think just like you would when you follow procedures. Their thoughts are your instructions! Cool right?
What is a Function?
A function is a built-in command that is used for a very specific function. They can usually be categorized into 2 groups, inputs, and outputs. “print()” is a very common output for Python, while the function “input” is used for Python as well.
What is a Variable?
A variable is a placeholder for information. They can hold a variety of things but the most common are integers and strings. Integers are numbers as you might know. Strings are usually words but can still include numbers and/or symbols.
Now I will teach you a few key things about Python!
Next, you need to download Python. Go to this website and download the normal OS. Unless you have a Mac then I suggest you download the via the Mac button below the big button.
https://www.python.org/downloads/
Next, you will have to download the installer. The button should do it for you but just in case check that you have the application IDLE (Python 3.9 64-bit) if you do great you can now start coding!!
{IMPORTANT: If you have a Windows computer and you really do want to get into using Python then I highly suggest that you get Visual Studio Code. It is so much better to work with and has so many more features. You will have to download tools for python because it is a multi-language IDE (IDE stands for an integrated development environment) But for this lesson, I suggest you just use IDLE (Python 3.9 64-bit) and then if you are still really interested, search on google How to get Visual Studio Code. Take my advice it is a great IDE and it has so much faster and overall better.}
Ok, the first thing I suggest you do after you open up IDLE is to go to options and then click on configure IDLE. Then click on highlights and change the button that says IDLE Classic, to IDLE Dark. Finally, click ok. If you want to get serious about coding you will save yourself so many headaches by doing this, just trust me the blinding white light would have given you too many headaches. Next, you should open a new file by going to file and clicking on the button new file. This will open up a window called untitled. As part of programming tradition, all people should first write this line of code before they start to learn any programming language. Type this exactly ‘print(“Hello World!”)’. then save by pressing Ctrl+S/Cmd+S. Then press F5 or if you don’t have that button go to Run and then Run Module. (It should show you the hotkey for it next to the words “Run File”) IDLE Shell should then pop up and it should say
Python 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)] on win32
Type “help”, “copyright”, “credits” or “license()” for more information.
>>>
= RESTART: C:/Users/[Here it should show your computer User]/Desktop/[Shows where you saved the file]/[Name of the file].py
Yay! You wrote a line of Code!! Hopefully, this is the first of many!
Ok, the next thing to do is to start to research more things in Python. The best website I have found to give you a tutorial for python is w3schools.com. If you want to seriously learn Python, use this website. It has taught me 90% of what I know about Python. It is amazing!
https://www.w3schools.com/python/default.asp
Honestly, this website will teach you so much more than I ever could so I suggest you use it.
I suggest going through this tutorial in its entirety! It is kind of long but it is really fun to do so I still think you should do the whole thing. If you were just following along with this lesson then great thanks for reading this I hope I taught you a thing or two and maybe sparked a love for coding in you!
This Photo by Unknown Author is licensed under CC BY-SA-NC
Thank you so much for reading this post! This will be my last post for a while but hopefully, I can start posting again at the start of next school year. I thank all of my readers so much and give a huge shout-out to all of my peers at the Student Blog! Thank you Mrs.Sanderson for making this possible. And I want to wish the best of luck to Illia Solano who will be graduating this year. And Finally, I can’t emphasize enough how this would not be possible without Mrs.Sanderson!
-Kanyon Pierce