Python Programming For Beginners : #1 Introduction

in #utopian-io7 years ago

PYTHON TUTORIALS by skpjr001.png

INTRODUCTION

Hello Everyone and welcome to my first lesson of a new series about the Python language. I have just finished all the required stuff needed for this series on the Python programming language which i will be posting thrice a week.

In this series i will be covering all the basics of python programming and at the last there will be two projects that you will be coding at your own and there will be one small project in the series which we will do while learning python programming.

In this first Introduction post , I will be covering how to set up your computer so that you have the tools to work with the python language and how to create and run your first Python program which will be a simple Hello World application because everyone starts with this simple program in language.

So let's dive straight into it .

INSTALLING PYTHON

You can easily download the latest version of python 3
from its official website given below

https://www.python.org/downloads/

This link will bring up a webpage that looks like the one below.


Download screen on the Python website.

As you can see above I have added a print screen of the downloads page on the official Python website. On this page, you will want to download the latest version of the software which is marked out with a red circle. Also, take note of the second red circle. If you have a do not use Windows then you can find the download file for your own OS.

After you have downloaded the installer you need to execute the installer, you can then execute the program. The first screen you will be presented with is the one below.


Python install wizard screen 1

On the screen above, click Install Now which is shown by the red circle.

After you have clicked Install Now, the install wizard will install all of the necessary Python files and you will be presented with the following screen.


Python install wizard screen 2

This window just tells you that the install was successful, click on the close button marked by the red circle to carry on.

After pressing close, use the search feature of your operating system to search for IDLE, this is the IDE that comes standard with Python and it is the one which we will be using for the remainder of this series.


Search for IDLE in start menu and Once you have clicked on the idle application you will be presented with the following screen.


The Python Shell

The program in the image above is named the Python Shell, you can think of this like the command line, this is where your program will run and will become more apparent throughout the series.

Now you are going to start writing your first Python program.

Hello World Program

To start this program we need a text editor. Luckily the Python IDLE program contains a text editor to access that we need to go to file and click new file(alternatively you could press "Ctrl + N"). See image below for a demonstration.


Creating a new file.

Now we will write out the program. If you are familiar with any programming language such as C++, you will see how much simpler Python is for creating small programs such as this. Have a look at the image below, the syntax is fairly self-explanatory but I will cover the key points.


Hello World program

As we can see above this program only consists of 1 single line. The function print() in python prints out whatever is contained within the parentheses to the console which we can see in the next two images below which will show you how to execute the program.

image.png

How to run a Python file in the shell


Output from a Hello World application

As you can see above, while you are on the text editor screen you go to the run menu and click on run module(or you can just press F5).

On the second image, you can see that the program has printed out the string value "Hello World" to the Python shell.

Congratulations you have just created and run your first program.

Conclusion

This program was designed just to be a very simple introduction to the IDLE program for python and a test to make sure that the language was downloaded and installed properly on your machine. Hopefully, you now have the python language and the IDLE program installed on your computer and you are now able to run Python programs.

Look forward to my next lesson on variables.

As always if there are any improvements you think I can make to this post then please leave a comment and I will consider adding it.

Thank you for reading and I hope that someone will get some use out of these tutorials.

Message to Steemians

Thanks for taking the time to read my post, if you are interested in Science, Technology or Computer Science then check out my blog @skpjr001 , content is a little sparse at the moment but I am making an effort to provide good quality original content to the Steemit community.

In Upcoming weeks I'll be Preparing myself to create Python for DATA SCIENCE Series as simple as possible , if have any suggestions comment them down below.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

This post received a 1% upvote from @morwhale team thanks to @skpjr001! For more information, click here! , TeamMorocco! .
STEEM Price : 3.191 $

Thanks for this! Python is wayyy easier than Java, right?

Yaa it is compared to any other programming language.

Resteemed, upvoted & followed you @skpjr001!
FREE resteem, upvote & follow available here:
https://steemit.com/christmas/@ronel/merry-christmas-special-version

Thanks for your gift , Merry Christmas.

You're welcome.
Merry Christmas to you too!

Thanks for the tutorial.
It looks fairly easy.

thanks , I will try my level best to present things as simple as possible.

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

thanks for reviewing.

Hey @skpjr001 I am @utopian-io. I have just upvoted you!

Achievements

  • Seems like you contribute quite often. AMAZING!

Suggestions

  • Contribute more often to get higher and higher rewards. I wish to see you often!
  • Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!

Get Noticed!

  • Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x