Welcome Back to Think Like A Programmer, where we break down complicated computer science concepts into bite-sized articles for you.
In today’s article we’ll be looking at how to work with variables in python. if you
If you haven’t looked at the previous two lessons - please do so first. That way you’ll be able to walk through all the source code that we’ve provided in this article.
You can check out the two articles here
👉 Setting Up Your Python Development Environment
👉 What is the PVM?
So, without ado, let’s start our python programming language journey. At this point I will assume that you already have your python development environment setup and know how to run a program.
If you’re still facing problems with your set-up, feel free to reach out and drop me a message at any point in time.
Our First Baby Steps
Last week, we got python to print out some strings for us using the following file
content = "hello world"
print(content)
When we ran this code, we got the output of
hello world
Let’s revisit our original input - output diagram
In this case, what is our input and what is our output? Well let’s walk through the code step by step to see how hello world might be printed out.
In our first line, we declared a variable called content and assigned the value of hello world to it.
This was our first use of what is known as a python variable.