one-thing-that-will-help-you-get-started-with-computer-programming

Learn Computer Programming: One Thing You Must Know

I see so many people who want to learn computer programming…

But, why?

Because it’s without any doubt one of the most demanded skills on the market right now.

Without programmers you wouldn’t be able to…

…use Google to search anything in a fraction of a second

…order your favourite products on Amazon with one click

…share moments of your life through Facebook

…message your friends on Whatsapp

…watch any sort of videos on Youtube

And this list could go on forever!

If you are here you might be wondering how to get started with computer programming?!?

It is not difficult as long as you are very clear about one thing.

And that’s the one thing that most people struggle with when they want to get started with programming.

The First Step to Become a Programmer

The one thing you need to get started is…

decide the programming language you will be focusing on and stick to it.

And I understand if you feel it’s not an easy choice, there are so many programming languages nowadays!!

For this reason I want to help you…

I want to give you a clear path to follow.

It doesn’t have to be a decision for life and it’s definitely one of the easiest programming languages you can start with to build your knowledge.

I’m referring to Python.

Why Python?

It’s easy to read…

It allows you to write programs with very few lines of code…

Writing your first program in Python is easy…

You don’t believe me?

By the end of this article you will write your first Python program 🙂

Practice Makes You Perfect

Have you ever heard people saying:”Practice makes you perfect” ?

What about?

“Reading books makes you perfect” ?

Unlikely!

The recipe to become a programmer is very simple…

Practice, practice, practice.

So, let’s practice now!

Your First Python Program

The good news is…you can write your first Python program here on CodeFather.

No need to install anything on your computer right now.

Click here to open a Python interpreter where you will be able to write your code!

Where shall we start?

What is the most common program that people write to get started?

A program that prints the message:”Hello World!”

Let’s see how to do it in Python…

In the Python online interpreter I have mentioned before write the following:

print("Hello World!")

And then press the play icon to execute it.

You will see the “Hello World!” message on the right side of the screen.

So, the print() function prints whatever message you are passing to it, to the screen.

Simple no?

You can see a Python program as a sequence of different functions that are executed in a specific order to solve a problem.

What is a Variable?

Let’s learn something else…

One of the most important concepts in Python programming and in programming in general: variables.

A variable is used to store values that you can use in your program.

Examples of values for a variable are…the number 3, the word “happy”, etc…

So, let’s see how to use a variable in our program.

number_of_days=30
print("Hello World! We will learn Python in %d days" %number_of_days)

We define a variable called number_of_days and we assign the number 30 to it.

The = sign is used to assign a value to a variable, where the variable name is on the left of the equal sign and the value of the variable is on the right.

Then we use %d in the print command that will be replaced by the value of the variable.

What is %d?

It’s just a placeholder for numeric or decimal values.

If we execute this program we get the following message:

Hello World! The value of the variable is 5

Makes sense?

Conclusion

Congratulations! You have written your first Python program!

You have learned:

  • That to print a message you can use the print() function.
  • How to use the Python interpreter (write code, execute it and see the output of your code).
  • What is a variable and how you can use it in your programs.

Is everything clear?

Let me know if you have any questions 🙂

The Python Starter Checklist

Are you getting started with Python?

I have created a checklist for you to quickly learn the basics of Python. You can download it here for free.

Share knowledge with your friends!

3 comments

Leave a Reply

Your email address will not be published. Required fields are marked *