This website includes Education Information like a programming language, job interview question, general knowledge.mathematics

Education log

PageNavi Results No.

Ads

Tuesday, January 7, 2020

how does a computer run a python program

how does a computer run a python program



Programs are made up of commands that tell the computer what to do. These commands are called statements, which the computer executes. This chapter describes the simplest of Python's statements and shows how they can be used to do arithmetic, which is one of the most common tasks for computers and also A great place to start learning to program. It's also the basis of almost everything that follows.

How Does a Computer Run a Python Program?

In order to understand what happens when you're programming, you need to have a basic understanding of how a computer executes a program. The computer is assembled from pieces of hardware, including a processor that can execute instructions and do arithmetic, a place to store data such as a hard drive, and various other pieces, such as a computer monitor a keyboard. a card for connecting to a network, and so on.

  To deal with all these pieces, every computer runs some kind of operating system, such as Microsoft Windows, Linux, ur bac OS X. An operating system, or OS, is a program; what makes it special is that it's the only program on the computer that's allowed direct access to the hardware. When any other application (such as your browser. a spreadsheet program, or a game) wants to draw on the screen, find out what key was just pressed on the keyboard. or fetch data from the hard drive, it sends a request to the OS (see Figure 1. Talking to the operating system, on page 8).

  This may seem like a roundabout way of doing things, but it means that only the people writing the OS have to worry about the differences between one graphics card and another and whether the computer is connected to a network through ethernet or wireless. The rest of us everyone analyzing scientific data or creating 3D virtual chat rooms-only have to learn our way


No comments:

Post a Comment