Categories
python

How to Install Python on windows and Write Your First Python Program

Whether you want to create an awesome website or build the next matrix-like AI, you need to know to program. If you are a beginner in the programming world, then programming tutorials even for beginners might seem daunting. But, Python will be an excellent starting way for your programming journey or to build your dreams from “nothing”. In this Python Programming Tutorial series, I am going to introduce you to the beautiful world of programming and python and in this article, I’ll show you how to install and write your first python program on any version of windows.

What is Python?

Python is basically one of the most popular and used programming languages in today’s world.

Suppose, you are feeling hungry. You may express it in many ways. You can non verbally convey it by crying or catching attention. To verbally express it, you may use any 6,500 current languages in this world.
In English, it sounds: I am Hungry
In Bangla, it is said as: আমি ক্ষুধার্ত
In Japanese, they say: お腹が空きました (Onaka ga akimashita)

The point is, no matter how you express it, in the end, it will showcase the same meaning which is your need to eat.

In the same way, to communicate with our computer and do something wonderful with it, we need to use programming languages. Every language has its own grammar, syntax, and usage.

some food for you

Why this name?

When I started watching various Python tutorials, I wondered about the reason behind the name Python Language. To be honest, whenever I hear the word “Python”, my monkey brain automatically creates a huge python snake image and makes me a bit nervous.

Well, turns out that, the creator of the Python language, Guido van Rossum used to read the published scripts from “Monty Python’s Flying Circus”. He wanted to give his programming language a short, unique, and slightly mysterious name. So inspired by Monty Python he gave his language name Python.

How to Install Python on Windows 10/8.1/8/7

Okay, enough of the chit-chat. Let’s start the fun part. In this Python Programming Tutorial, we will learn to install and run our very first program in python.
You can directly install python or install Anaconda(which will take care of it)
By installing Anaconda you have to face less hassle and can install many important packages with one click.
If you are using a Linux Operating System, chances are you already have python preinstalled.

In this python tutorial article, we will talk about how to install python on windows 10/8.1/8/7. But the procedure is more or less the same for other operating systems.

Time needed: 1 hour.

How to install Python on Windows(Step By Step Guide)

  1. Go to https://www.python.org/downloads/

    Here you will find a “Download” button. It will download the latest version of Python. The latest version is 3.9.2 right now(2nd April 2021).

  2. (Optional) Choose another Python version

    If you scroll down you will find older/different versions of Python. Remember, Python 2.X.X is very different than any python 3.X.X version. So, choose carefully.

  3. Choose x86-64 executable or zip file format in order to install Python

    If you click download for the latest version, your download will automatically start. If you choose another Python version, another page will open like this. Scroll down and you will find a section named “Files”, choose x86-64 executable or zip file if you have a 64-bit machine. Choose the x86 version only if you have a 32-bit machine. (Note: you cannot run a 64 variant of python in your 32-bit machine. So, choose carefully. if you choose zip, you have to extract it with any compression software like WinRAR. I personally prefer the EXE version, because I am lazy!)

  4. Run the Python launcher. Check “Add Python 3.XX/2.XX to path”.

    After finishing the download, run the downloaded python launcher. Check “Add Python 3.XX/2.X.X to path” NOTE: If you uncheck it, then you have to manually configure the environmental variable. Yeah! So, check it.

  5. Click on “Install Now” to install it to the default location.

    Or you can also click on “Customize installation” to install python to your desired location. But do that, only if you know what you are doing. To avoid facing any unnecessary hassle, install Python to the default location.

  6. Run Command Prompt to make sure Python has been installed well.


    To check if python is installed, press “Windows Key + R”, write “cmd” and run. The command prompt will be opened. Now enter “Python –version” without any quotation marks. If everything works fine, you will find something like this.
    (Note: Just because I have already installed Python 3.6.6 on my machine, it is showing this version. In your machine, it will show the version you to check if python is installed, press “Windows Key + R”, write “cmd” and run. The command prompt will be opened. Now enter “Python –version” without any quotation marks. If everything works fine, you will find something like this.
    (Note: Just because I have already installed Python 3.6.6 on my machine, it is showing this version. In your machine, it will show the version you installed)

Common Problems Faced to install Python on windows

I can’t see the python version in the command prompt.

Ans: You might’ve missed checking the “Add Python 3.XX to Path” option during the installation. So, now either you need to add the environment variable all by yourself or go to the folder where you have installed python. Press the Windows key(beside the left Ctrl key) and ‘R’ keys together. A new command prompt window will appear. Now check your python version as mentioned above.

Python setup failed error: “0x80070005 access denied.”

Ans: Right-click the Python Installer file. Select “Run as administrator”. Now install python normally.

Python setup failed error: “0x80070642 – User canceled installation”

Ans: Uncheck the “Install launcher for all users” option when you are installing python. Once unchecked, the installer should work as expected.

I can’t find any python version on the Python download page.

Ans: Check your internet connection.

Our First Python Programming

Creating Our Work Folder

Let’s write our first python program, shall we?

Let’s make a folder named “My Python Apps”. You can make this folder anywhere you want. After that press the “windows” button and write “IDLE” and run it. This is the official python shell*. You can directly run codes from here.

Our First Python Program

Let’s print something. To print something we have to literally just type “print()”  with no quotation marks. Inside there write anything you want but now with the Quotation Marks!

The reason is print is a function and the writing we are putting inside the bracket is a string that has to be declared within the quotation marks. Don’t worry, if this sounds a bit complicated, we will talk about it in detail later.

For now, let’s type exactly as follow:

print("Hello, world!")

Now after pressing enter, you will have something like this:

Congratulation! You just created your first program. Let’s now experiment with it. Let’s try putting our name in there. Instead of typing “Hello World”, let’s put “My name is” and your name. Press Enter. You should have something like this:

You can also try to and experiment with other things in the print. Try to see what works and whatnot. If something won’t work, something like this might occur:

Don’t worry, it’s just an error that basically tells you what is not working. We will discuss errors more deeply in the later python tutorial articles.

Conclusion

That’s the end of the first article of this Python Programming Tutorial series. I hope you enjoyed it. In the future, we will discuss more complex topics like functions, OOP, and others.

  •  Shell: In a simple term, a shell is a user interface that takes command as input, from the user and executes the command.

References

Some very useful python learning websites (in my opinion)

Some very useful python learning YouTube channels (in my opinion)

14 replies on “How to Install Python on windows and Write Your First Python Program”

Mate, at least choose SEO-related posts to comment on. This is a programming post, and do you know getting backlinks from unrelated posts will just hurt your SEO? XD

you are in reality a excellent webmaster. The website loading pace is incredible.
It kind of feels that you are doing any unique trick.

Furthermore, The contents are masterwork. you have done a magnificent task
in this matter!

Thanks , I’ve recently been searching for information approximately this subject for a while and yours is the greatest I’ve found
out till now. However, what about the bottom line?
Are you sure about the supply?

I do accept as true with all the ideas you’ve presented to your post. They’re very convincing and can certainly work. Still, the posts are very short for newbies. May you please prolong them a bit from subsequent time? Thanks for the post.

Whether you believe in God or not, this is a must-read message!!!

Throughout time, we can see how we have been slowly conditioned to come to this point where we are on the verge of a cashless society. Did you know that the Bible foretold of this event almost 2,000 years ago?

In Revelation 13:16-18, we read,

“He (the false prophet who decieves many by his miracles) causes all, both small and great, rich and poor, free and slave, to receive a mark on their right hand or on their foreheads, and that no one may buy or sell except one who has the mark or the name of the beast, or the number of his name.

Here is wisdom. Let him who has understanding calculate the number of the beast, for it is the number of a man: His number is 666.”

Referring to the last generation, this could only be speaking of a cashless society. Why? Revelation 13:17 tells us that we cannot buy or sell unless we receive the mark of the beast. If physical money was still in use, we could buy or sell with one another without receiving the mark. This would contradict scripture that states we need the mark to buy or sell!

These verses could not be referring to something purely spiritual as scripture references two physical locations (our right hand or forehead) stating the mark will be on one “OR” the other. If this mark was purely spiritual, it would indicate only in one place.

This is where it really starts to come together. It is shocking how accurate the Bible is concerning the implatnable RFID microchip. These are notes from a man named Carl Sanders who worked with a team of engineers to help develop this RFID chip

“Carl Sanders sat in seventeen New World Order meetings with heads-of-state officials such as Henry Kissinger and Bob Gates of the C.I.A. to discuss plans on how to bring about this one-world system. The government commissioned Carl Sanders to design a microchip for identifying and controlling the peoples of the world—a microchip that could be inserted under the skin with a hypodermic needle (a quick, convenient method that would be gradually accepted by society).

Carl Sanders, with a team of engineers behind him, with U.S. grant monies supplied by tax dollars, took on this project and designed a microchip that is powered by a lithium battery, rechargeable through the temperature changes in our skin. Without the knowledge of the Bible (Brother Sanders was not a Christian at the time), these engineers spent one-and-a-half-million dollars doing research on the best and most convenient place to have the microchip inserted.

Guess what? These researchers found that the forehead and the back of the hand (the two places the Bible says the mark will go) are not just the most convenient places, but are also the only viable places for rapid, consistent temperature changes in the skin to recharge the lithium battery. The microchip is approximately seven millimeters in length, .75 millimeters in diameter, about the size of a grain of rice. It is capable of storing pages upon pages of information about you. All your general history, work history, crime record, health history, and financial data can be stored on this chip.

Brother Sanders believes that this microchip, which he regretfully helped design, is the “mark” spoken about in Revelation 13:16–18. The original Greek word for “mark” is “charagma,” which means a “scratch or etching.” It is also interesting to note that the number 666 is actually a word in the original Greek. The word is “chi xi stigma,” with the last part, “stigma,” also meaning “to stick or prick.” Carl believes this is referring to a hypodermic needle when they poke into the skin to inject the microchip.”

Mr. Sanders asked a doctor what would happen if the lithium contained within the RFID microchip leaked into the body. The doctor replied by saying a terrible sore would appear in that location. This is what the book of Revelation says:

“And the first (angel) went, and poured out his vial on the earth; and there fell a noisome and grievous sore on the men which had the mark of the beast, and on them which worshipped his image” (Revelation 16:2).

You can read more about it here–and to also understand the mystery behind the number 666: https://2ruth.org/rfid-mark-of-the-beast-666-revealed/

The third angel’s warning in Revelation 14:9-11 states,

“Then a third angel followed them, saying with a loud voice, ‘If anyone worships the beast and his image, and receives his mark on his forehead or on his hand, he himself shall also drink of the wine of the wrath of God, which is poured out full strength into the cup of His indignation. He shall be tormented with fire and brimstone in the presence of the holy angels and in the presence of the Lamb. And the smoke of their torment ascends forever and ever; and they have no rest day or night, who worship the beast and his image, and whoever receives the mark of his name.'”

Who is Barack Obama, and why is he still in the public scene?

So what’s in the name? The meaning of someone’s name can say a lot about a person. God throughout history has given names to people that have a specific meaning tied to their lives. How about the name Barack Obama? Let us take a look at what may be hiding beneath the surface.

Jesus says in Luke 10:18, “…I saw Satan fall like lightning from heaven.”

The Hebrew Strongs word (H1299) for “lightning”: “bârâq” (baw-rawk)

In Isaiah chapter 14, verse 14, we read about Lucifer (Satan) saying in his heart:

“I will ascend above the heights of the clouds, I will be like the Most High.”

In the verses in Isaiah that refer directly to Lucifer, several times it mentions him falling from the heights or the heavens. The Hebrew word for the heights or heavens used here is Hebrew Strongs 1116: “bamah”–Pronounced (bam-maw’)

In Hebrew, the letter “Waw” or “Vav” is often transliterated as a “U” or “O,” and it is primarily used as a conjunction to join concepts together. So to join in Hebrew poetry the concept of lightning (Baraq) and a high place like heaven or the heights of heaven (Bam-Maw), the letter “U” or “O” would be used. So, Baraq “O” Bam-Maw or Baraq “U” Bam-Maw in Hebrew poetry similar to the style written in Isaiah, would translate literally to “Lightning from the heights.” The word “Satan” in Hebrew is a direct translation, therefore “Satan.”

So when Jesus told His disciples in Luke 10:18 that He beheld Satan fall like lightning from heaven, if this were to be spoken by a Jewish Rabbi today influenced by the poetry in the book of Isaiah, he would say these words in Hebrew–the words of Jesus in Luke 10:18 as, And I saw Satan as Baraq O Bam-Maw.

The names of both of Obama’s daughters are Malia and Natasha. If we were to write those names backward (the devil does things in reverse) we would get “ailam ahsatan”. Now if we remove the letters that spell “Alah” (Allah being the false god of Islam), we get “I am Satan”. Coincidence? I don’t think so.

Obama’s campaign logo when he ran in 2008 was a sun over the horizon in the west, with the landscape as the flag of the United States. In Islam, they have their own messiah that they are waiting for called the 12th Imam, or the Mahdi (the Antichrist of the Bible), and one prophecy concerning this man’s appearance is the sun rising in the west.

“Then I saw another angel flying in the midst of heaven, having the everlasting gospel to preach to those who dwell on the earth—to every nation, tribe, tongue, and people— saying with a loud voice, ‘Fear God and give glory to Him, for the hour of His judgment has come; and worship Him who made heaven and earth, the sea and springs of water.'” (Revelation 14:6-7)

Why have the word’s of Jesus in His Gospel accounts regarding His death, burial, and resurrection, been translated into over 3,000 languages, and nothing comes close? The same God who formed the heavens and earth that draws all people to Him through His creation, likewise has sent His Word to the ends of the earth so that we may come to personally know Him to be saved in spirit and in truth through His Son Jesus Christ.

Jesus stands alone among the other religions that say to rightly weigh the scales of good and evil and to make sure you have done more good than bad in this life. Is this how we conduct ourselves justly in a court of law? Bearing the image of God, is this how we project this image into reality?

Our good works cannot save us. If we step before a judge, being guilty of a crime, the judge will not judge us by the good that we have done, but rather by the crimes we have committed. If we as fallen humanity, created in God’s image, pose this type of justice, how much more a perfect, righteous, and Holy God?

God has brought down His moral laws through the 10 commandments given to Moses at Mt. Siani. These laws were not given so we may be justified, but rather that we may see the need for a savior. They are the mirror of God’s character of what He has put in each and every one of us, with our conscious bearing witness that we know that it is wrong to steal, lie, dishonor our parents, murder, and so forth.

We can try and follow the moral laws of the 10 commandments, but we will never catch up to them to be justified before a Holy God. That same word of the law given to Moses became flesh about 2,000 years ago in the body of Jesus Christ. He came to be our justification by fulfilling the law, living a sinless perfect life that only God could fulfill.

The gap between us and the law can never be reconciled by our own merit, but the arm of Jesus is stretched out by the grace and mercy of God. And if we are to grab on, through faith in Him, He will pull us up being the one to justify us. As in the court of law, if someone steps in and pays our fine, even though we are guilty, the judge can do what is legal and just and let us go free. That is what Jesus did almost 2,000 years ago on the cross. It was a legal transaction being fulfilled in the spiritual realm by the shedding of His blood.

For God takes no pleasure in the death of the wicked (Ezekiel 18:23). This is why in Isaiah chapter 53, where it speaks of the coming Messiah and His soul being a sacrifice for our sins, why it says it pleased God to crush His only begotten Son.

This is because the wrath that we deserve was justified by being poured out upon His Son. If that wrath was poured out on us, we would all perish to hell forever. God created a way of escape by pouring it out on His Son whose soul could not be left in Hades but was raised and seated at the right hand of God in power.

So now when we put on the Lord Jesus Christ (Romans 13:14), God no longer sees the person who deserves His wrath, but rather the glorious image of His perfect Son dwelling in us, justifying us as if we received the wrath we deserve, making a way of escape from the curse of death–now being conformed into the image of the heavenly man in a new nature, and no longer in the image of the fallen man Adam.

Now what we must do is repent and put our trust and faith in the savior, confessing and forsaking our sins, and to receive His Holy Spirit that we may be born again (for Jesus says we must be born again to enter the Kingdom of God–John chapter 3). This is not just head knowledge of believing in Jesus, but rather receiving His words, taking them to heart, so that we may truly be transformed into the image of God. Where we no longer live to practice sin, but rather turn from our sins and practice righteousness through faith in Him in obedience to His Word by reading the Bible.

Our works cannot save us, but they can condemn us; it is not that we earn our way into everlasting life, but that we obey our Lord Jesus Christ:

“And having been perfected, He became the author of eternal salvation to all who obey Him.” (Hebrews 5:9)

“Now I saw a new heaven and a new earth, for the first heaven and the first earth had passed away. Also there was no more sea. Then I, John, saw the holy city, New Jerusalem, coming down out of heaven from God, prepared as a bride adorned for her husband. And I heard a loud voice from heaven saying, ‘Behold, the tabernacle of God is with men, and He will dwell with them, and they shall be His people. God Himself will be with them and be their God. And God will wipe away every tear from their eyes; there shall be no more death, nor sorrow, nor crying. There shall be no more pain, for the former things have passed away.’

Then He who sat on the throne said, ‘Behold, I make all things new.’ And He said to me, ‘Write, for these words are true and faithful.’

And He said to me, ‘It is done! I am the Alpha and the Omega, the Beginning and the End. I will give of the fountain of the water of life freely to him who thirsts. He who overcomes shall inherit all things, and I will be his God and he shall be My son. But the cowardly, unbelieving, abominable, murderers, sexually immoral, sorcerers, idolaters, and all liars shall have their part in the lake which burns with fire and brimstone, which is the second death.'” (Revelation 21:1-8).

Leave a Reply

Your email address will not be published.