Python Part 1 - Getting started with Python

Python Part 1 - Getting started with Python I'm very excited to introduce this series of tutorials from wiseart training which will teach you how to program in python at any point you'll be able to.

Click on the link which appears at the top right of your screen to download code examples useful resources or exercises to do with the video you're currently watching.

And with that i think it's time for my avatar to bid you goodbye so you can concentrate on learning python so here's what you'll learn in this.

Tutorial we'll begin with installing python how to get it on your machine we'll look at command line programs where you can run single commands in.

Python we're then going to look at creating file programs where you can execute a series of commands we'll look at the all all-important.

Topic of using variables we'll take a brief digression and look at the input function for getting input from your user and then we'll look at more in more.

Python Part 1 - Getting started with Python

Detail at types of variables we'll look at testing conditions with if statements in python and finally and this is unique to this video we'll look at what comes next in.

Your learning so let's get started so this tutorial could have been called owl stretching time because that was one of the original.

Names proposed for monty python's flying circus but wiser heads prevailed and i'm pleased to say i'm now teaching you python instead.

The language was first created and developed by gideo van rossum my sincere apologies if i've mispronounced his name the first thing to do is to see whether it is installed.

On your computer and the instructions which follow are actually specific to windows just for this one section so to do that i can go to the cortana.

Search bar and i can type in programs and then if you execute that you should see whether you have python installed so what i'm going to do is search for.

    Python

    And you can see i've got the latest version at the time of speaking 3.9.6 i've also got something called the python.

    Launcher and what i'm going to do is uninstall both of those two programs behind the scenes and i'll see you again in a short while you can see now that i've successfully.

    Uninstalled python there's nothing shown in the list for it so what i'm going to do now is to show you how to put it on your windows machine.

    As i said this is the only one of the few bits specific to windows so i can go to a search engine i've chosen this little known one and.

    I'm going to run the install python search and almost certainly the first results returned will be python.org and this is a website which you're going.

    To become familiar with as you learn more about python so i'm going to click on the button to download python i'm downloading the latest version that the time is speaking 3.9.6.

    And then they're going to run that executable file and what that will do is begin the python installation process now the first thing i'm going to do is tick this box which says.

    Add python 3.9 to path and the reason for that is python is absolutely terrible at managing paths and anything i can do to make the process easier has to be a good idea.

    And then what i'll do is show you how to customize your installation just to prove that you probably don't need to do it so all the things here you probably want.

    You want documentation why not

    You definitely want to be able to use the pip installer to install modules we're going to be using the idle development environment very shortly.

    And tkinter will allow you to create your own graphical user interface programs when you become more skilled in python you probably want to be able to run your.

    Own tests at some point in the future and the pi launcher is an extra utility making it easy to run python programs from the desktop is not terribly important but you might as.

    Well install it we're just going to go back and install python by clicking on this button it will ask me to confirm that and start installing.

    So you can see that my setup was successful that's good news i can close that down and if you go and look at your list of programs you'll see it's reinstated.

    In my case the python programs so i'm all set to run python so before you can write any python at all you need to choose an integrated development environment or ide which is.

    A really fancy way of saying somewhere where you can type your code so one possibility would be notepad and what i want to do now is show you why this would be a terrible choice.

    Just because i think it throws light on what will make a better one so i'm going to type the print command in python it's a valid python command but notepad isn't giving me any help at.

    All and even if i try typing a message with our message in brackets i still get no help not only that but it's not possible to run the command in notepad.

    So for various reasons notepad wouldn't make a good choice so what would be a better one let's close notepad down just for the moment to get it out of the.

    Way three possibilities would be pycharm spider or anaconda and i've grouped them all together because they're all specific to writing python you can't use them to.

    Program in any other language and they'd all be perfectly good choices another would be visual studio slightly over the top of big beast which you can use to develop websites and all.

    Sorts of other things besides or you could use visual studio code which despite its name isn't actually the same program at all and that's the one we're actually going.

    To be using later on in this tutorial but for the moment we're going to use idle now idle is built into python that's its great.

    Advantage so we can get up and running programming straight away it stands for the integrated development and learning environment.

    And it was named after eric idle that's in there he was one of the original six pythons the other ones being from left right terry jones.

    Graeme chapman john cleese terry gilliam who did the animations and michael palin so to run idle you should be able to just go to it as a program installed on your computer.

    You can see it's nestling there waiting to be run and what i'm going to do is open that up and type in my first command so you can type in any command i'll do.

    The same one pretty much by typing the name of the command followed by an open brackets and you can see the advantage that i have a list of all the arguments that's.

    What these things are called they won't make much sense at the moment and i also get the print word is color coded so i can see i'm on the right lines.

    I'm going to print out the noise an owl makes at least in the uk which is to it and i'm going to close my parenthesis and i press enter to run my command you.

    Can see the output appears in the command prompt that's how you can type single line commands in idle what would be better is to be able to.

    Create a series of commands to print out for example twit to woo as two separate lines and to do that we're going to have to learn how to create new files.

    In idle so i'm going to create a new program to hold two command lines to print out the words to wit and then the words to woo very ambitious.

    So to create a new program you can choose file from the menu and choose new file or you can press ctrl n to do the same thing you can then type in any command you like.

    But i'm going to begin with a comment comments begin with a hash key in python and the advantage of them is you can explain what you're trying to achieve.

    And anything you type in will be completely ignored by the python interpreter so i'm going to put a comment saying make out noises quite a descriptive.

    Uh term for what's about to happen and then i can type in my first command so i'm going to put a print to it that needs to go in inverter commas because it's the string of text.

    To be displayed and then going to press return i'll press return a couple of times i get a blank line blank lines will be ignored by the.

    DISCLAIMER: In this description contains affiliate links, which means that if you click on one of the product links, I'll receive a small commission. This helps support the channel and allows us to continue to make videos like this. All Content Responsibility lies with the Channel Producer. For Download, see The Author's channel. The content of this Post was transcribed from the Channel: https://www.youtube.com/watch?v=G1VNhuCJbuc
Previous Post Next Post