English subtitles

← What is Programming - Intro to Computer Science

Get Embed Code
14 Languages

Showing Revision 8 created 05/25/2016 by Udacity Robot.

  1. So let's get started with programming, and programming is really the core computer science.
  2. Most machines are designed to do just one thing.
  3. This is supposed to be a toaster, more of a representational drawing than an accurate one.
  4. And a toaster, we can do more than one thing with a toaster.
  5. We can put different things in it. We can toast bread, we can toast muffins, maybe it has some things we can use to change its behavior a little bit.
  6. We can turn a setting to make it toast for longer or shorter.
  7. But it's pretty limited in what it can do. Everything it can do is a variation on this basic functionality that it was designed for:
  8. this basic process of putting toast in, heating it up and getting the toast to pop out.
  9. If we want to change its behavior to do something really different, we'd have to physically alter the machine.
  10. We could maybe take the parts out, and put them together in a new way.
  11. If we're really creative we could make a bicycle from the toaster. That would be a pretty big project, though.
  12. So without a program a computer is even less useful than a toaster.
  13. You can't do anything without a program.
  14. The program is what tells the computer what to do.
  15. And the power of the computer, is that, unlike a toaster, which is only designed to do a few things, a computer can do anything.
  16. A computer is a universal machine. We can program it to do essentially any computation.
  17. So anything that we can imagine, anything that we can figure out how to write a program for, we can make the computer do.
  18. And what the program needs to be is a very precise sequence of steps.
  19. The computer by itself doesn't know how to do anything. It has a few simple instructions that it can execute.
  20. And to make a program do something useful we need to put those instructions together in a way that it does what we want.
  21. So we can turn the computer into a web browser, into a server, into a game-playing machine, into a toaster, without anywhere to put the bread.
  22. But it can do anything we can imagine: at least any computation we want to do.
  23. The power of the computer is that it can execute the steps super super fast.
  24. So we can execute billions of instructions in one second.
  25. The program gives us a way to tell the computer what steps to take.
  26. So there are many different languages for programming computers.
  27. The language we are going to learn in this course is the language called Python, like the snake. It is also named after Monty Python.
  28. The important thing about Python is that it gives us a nice high-level language that we can use to write programs.
  29. And that means instead of our program running directly on the computer, the programs we write will be an input to the Python program which runs on the computer.
  30. What Python is is called an interpreter. That means it runs our programs, it interprets them, executes the programs that we wrote in Python language by running a program in a language into the computer can understand directly.