top of page

Learn Python! | Part One

Updated: Apr 30


Pythob

Python! A snake of the wild! No I'm just kidding! Python is not a beast in the jungle, yet one in the world of code! So what is python? Python is a coding/programming language. How I like to think of a language that interprets code is somewhat like a laundry machine. How? Well you put all your dirty clothes in and you get the clean ones you want out! I might reference the laundry machine a few times so keep it in mind.

How Do I Code Python?

To code in any language, you'll need an Integrated Development Environment (IDE) or a code editor. Going back to the laundry machine analogy I was talking about, this is like your laundry detergent that makes it work. If you're looking to download an IDE, I would recommend: 1. VS Code 2. PyCharm (I use this) 3. IDLE (Comes with downloading python) Although, keep in mind that to use these, you'll need to download Python from online! If you prefer an online version where you don't need to download anything, here are a few good options: 1. Replit 2. W3 School's editor


One thing to keep in mind is that online editors are more limited. What do I mean? Well, this segues perfectly into modules! I won't delve fully into modules and experiment with them until either part 2 or 3. For now, just think of modules as akin to using a special kind of laundry machine; for example, it can change the color of your clothes! Right now lets go over the basics of what clothes to put into your machine and what they come out as!

Data Types

Data types are like different types of clothes! I'll cover more data types in future parts, but for now, let's focus on Integers and Strings. An Integer is a number, and a String is a group of characters. You use variables to hold these data types. It's similar to putting your dirty clothes in a box. Let's see it in action:

variables

Here, we have defined two variables, Variable_1 and Variable_2, each holding values. You can't have spaces while defining a variable, so I used an underscore. Variable_1 is holding a string, while Variable_2 is holding an integer.

printing variables

Here, you can see that we made use of a Python feature called "print". Now let's see what happens if we take away the quotes in "Hello World".


syntax error

It gives us a Syntax Error. Basically, the laundry machine didn't know how to wash the dirty clothes! That's the end of the First Python Tutorial. You can call me Samar Syntax, and together, let's wash all these dirty clothes. While doing that, we're innovating and creating!

686 views0 comments

Recent Posts

See All

Comments


Subscribe

Subscribe to our mailing list for regular updates on news, events, insightful blogs, and free code!

Thanks for subscribing!

bottom of page