hi this is Vaughn Smith this is the next in the series of learn to program videos you can teach your children how to
program a computer this is about the first language in actual computer programming instead we’re using something called
pseudocode. It’s not a computer programming language but
it’s similar to a most languages but it’s just made up on the fly I know a lot of computer
programming languages basic fortran C PHP and more I’m and there’s a lot of
similarities in these languages for example in this perhaps we have a function call tax applied and that is equal to let’s say 10 percent. percentage is 10 with the
percentage symbol % But most computers can’t handle that so
instead we use it as a ratio tax_rate=0.10 or to be a little bit shorter .1 so
that’s a valid statement in quite a few programming languages tax
rate tax_rate equals 0.1 With some languages you need to declare
clear things first perhaps you would have to say float tax_rate that tells a computer that
we have need something called a tax rate into
which you can put numbers so here tax rate becomes .1 so the language can set a float it could just as easily the a number or it could be a real like a real number like in algebra etc in the C programming language
which is very common they use the term float. Also in C they must terminate with a semi-colon love languages need a termination like
that tax rate equals .1 semi-colon tells the computer that this statement
is finished we’re gonna move on to the other
statement most computer languages have practically all of them blank lines are
no problem they’re just completely ignored. Similarly in most
programming languages all spaces or tabs are also ignored so I could just as
easily say here way in the middle of this screen tax rate equals point one terminated with semi-colon. Some may be
terminated with a period whatever. Depends on the language these three statements now are a workable guide to programming float tax_rate tax_rate equals .1 that’s what the
computer see is its gonna skip all the other spaces blank line spaces tabs whatever we call
those white space. Programming
on a white background like we’re doing here now notice that I’ve got two statements that are now identical in the original way appear there was a bunch of white
space between those two statements but the computer sees it like this tax
rate equals .1 then tax rate because .1 now what do you think happens when it
sees those two statements well it’s actually going to execute them so it’s going to do a tax rate and is
gonna put 2.1 in the tax rate then it’s going to see tax rate and it’s going to put a .1 in
there because that is exactly what I’ve told
it to do when it’s executing second statement the
computer has no idea that it just did exactly the same
statement one statement earlier the computer cannot think but can only
do what I tell it to do hopefully I tell it
to do the correct thing like put a tax rate of .1 into this system I’m and that’s what I intend to do but what regardless
whatever I tell it to do it will do if I say do it twice the computer will
do it twice doesn’t no that it already did it or at least it really doesn’t care
similarly I can go like this and put a whole bunch of tax rate
assignments to be point one it all and ends up being the same
the only thing that’s different is a course it takes longer to execute olive statements because to duplicate and its its efficient I am now we don’t really care about efficiency on
computers for the most part although I have done
lots of work where efficiency was critical. Now this
is a programming pseudo language and I’ve been trying to think have which language to
start to teach cue to how to teach your
children which would be the best and it is a hard hard question
because each language has the particular set of
strengths and a particular set of weaknesses I’m a lot of people have their favorite
programming language I have my favorite programming
languages I would say that for some things it’s PHP for other
things C for other things its language is
that you probably never heard of but it’s
what I use nowadays regardless here is the pseudocode I can type in whatever I want in the
beauty hears every time a press a key I don’t ever get an error I
just it just to let’s imagine the computer will do
whatever I say one of the classical programs that people usually use to
learn how to program a computer is something called hello world that’s the name of the program now some languages you might say remark REM hello world is just a comment
doesn’t do anything but ReM is something that let people
know to reserve work let’s in programming language basic others like in see it might be this hello world slash star that’s a comment so let’s start by writing hello world program in this super language so do that we have to do something we
want to tell people hello world so let’s it’s a we will do the print statement and then hello world and that’s it in this language I’m using print which means display
something on screen and whatever comes after the print gets
displayed on the screen so when you take this and you executed
the computer will magically take a look at the print
statement figure out what it needs to do to display on screen it’ll display the next thing which
happens to be a line called hello what world and the result will be
the computer will go like this hello world that is a hello world program in this pseudo language. The point really for hello world not so much the actual program but
usually it’s how to make sure your operating
environment is completely set up ready to go you have
your language installed you know how to use it you know how to use an editor all that stuff and here because it’s my
own little pseudo code doesn’t do anything hello in the C programming language which is very popular its going to end up being a quiet a bit
longer than this I’m now I maybe of I take a quick stab let’s
say in C you need to say include stdio.h and then you can have a main I’m putting in the line prints(“hello world”); and any other language will do the same as print in so many languages if you can’t remember the exact syntax but
that’s okay print hello world and that when
the computer runs it will go like this hello world now course a computer will not
make the same typographical error that I just made it
will just print what we have here hello world but not running it in the actual
computer and just in my editor so I’m showing you the basics
on how things go using absolute a language something out
just in bed okay now that it’s like other languages are going to be very
similar to basic and other kinds of programming
language it’s pretty much like I just said in the
beginning print hello world that’s it in other languages clockwork
and you might have to go indent and say right star comma Hello World just world same thing will just print out you style it a bit there had
just set up a main program to a printout of statement hello world I’m and worked all these
amount to the same thing have the point with C is you need to have see install db2 fortran
installed lift up everything that works you have to then
take your edit file and make it into at program then
you have to run the program and it’ll do what you tell it to do but
for now this is the first lesson all we had to do was run a little bit a
pseudocode looks like English uses a print statement Prince hello
world and there you go the computer has done what
we said to said it should do there’s no graphics
here there’s no windows there’s no up colors nothing like that’s just the
stempel list thing that we can do as people to
understand where this computer programming is going in
the next lessons were going to expand on Pseudo language and to started do things that involve more and
more processing power and then we will
eventually move into building programs there’s a lot of stuff out there that the
computer can do and since we are starting to program we
can go anywhere we want big games, business application more by
aps whatever we want so for now this was the very first language and you can get a
sub and state programming is pretty easy it just takes a lot of building steps so and the computer will do anything we
say to tell it to do it will not remember
anything else so I’ll see you next video where we get more involved in teaching your
children how to program a computer

Teach Your Children How to Program A Computer – First Lesson

7 thoughts on “Teach Your Children How to Program A Computer – First Lesson

  • December 10, 2013 at 2:59 am
    Permalink

    U

    Reply
  • December 10, 2013 at 3:01 am
    Permalink

    I want to be a computer genius… Not literary but I wanna be as if I know a lot about computers and I want to be smart with them and I was wondering if you could help me and I wanna learn code but I don't want to spend money and what would the easiest be for a beginner thx u very much plz respond

    Reply
  • December 13, 2013 at 4:27 am
    Permalink

    This helped a lot.. Thanks! 🙂

    Reply
  • December 29, 2013 at 2:32 am
    Permalink

    Before I go on the website do I need to download anything and will this website give me bugs and or viruses

    Reply
  • August 27, 2015 at 7:10 pm
    Permalink

    psuedo code isnt a real language. Its just for writing algorithims. You cant run it

    Reply
  • May 16, 2016 at 4:41 pm
    Permalink

    vaughn Smith thanks for your advantage I'm new and I would to start computer hw can I do the first step

    Reply
  • June 1, 2016 at 10:25 pm
    Permalink

    I wanna be Hacker (But Little Little things of hacking, dont looks like Anonymous,Unknown Name…) programmer, developer, creative person and Genius

    Reply

Leave a Reply

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