Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 15

Introduction to Python

Programming
Computer
Computer: Definition A computer is a machine that can be programmed to
manipulate symbols.
Its principal characteristics are:
• It responds to a specific set of instructions in a well-defined manner.
• It can execute a pre recorded list of instructions (a program).
• It can quickly store and retrieve large amounts of data.
Therefore computers can perform complex and repetitive procedures quickly,
precisely and reliably. Modern computers are electronic and digital.
The actual machinery (wires, transistors, and circuits) is called hardware; the
instructions and data are called software.
Types of Computers
Computers can be generally classified by size and power as follows:
• Supercomputer: An extremely fast computer that can perform hundreds of millions of instructions
per second
• Mainframe: A powerful multi-user computer capable of supporting many hundreds or thousands of
users simultaneously.
• Minicomputer: A multi-user computer capable of supporting up to hundreds of users
simultaneously.
• Personal computer: A small, single-user computer based on a microprocessor.
Computer components
All general-purpose computers require the following hardware components:
• Central processing unit (CPU): The heart of the computer, this is the component that actually executes
instructions organized in programs ("software") which tell the computer what to do.
• Memory (fast, expensive, short-term memory): Enables a computer to store, at least temporarily, data,
programs, and intermediate results.
• Mass storage device (slower, cheaper, long-term memory): Allows a computer to permanently retain
large amounts of data and programs between jobs. Common mass storage devices include disk drives
and tape drives.
• Input device: Usually a keyboard and mouse, the input device is the conduit through which data and
instructions enter a computer.
• Output device: A display screen, printer, or other device that lets you see what the computer has
accomplished.
In addition to these components, many others make it possible for the basic components to work together
efficiently. For example, every computer requires a bus that transmits data from one part of the computer
to another
ASCII table..
Types of Programs / Software

• System Software: include programs that are dedicated to managing the


computer itself, such as the operating system, file management
utilities, and disk operating system (or DOS). such as Operating
system,
• Application Software: Application software, or simply applications,
are often called productivity programs or end-user programs because
they enable the user to complete tasks, such as creating documents,
spreadsheets, databases and publications, doing online research,
sending email, designing graphic s, running businesses, and even
playing games!
Computer Programming Language
• A programming language is a vocabulary and set of grammatical rules
for instructing a computer or computing device to perform specific
tasks. The term programming language usually refers to high-level
languages, such as BASIC, C, C++, COBOL, Java, FORTRAN, Ada,
and Pascal.

• Each programming language has a unique set of keywords (words that


it understands) and a special syntax for organizing program
instructions.
• Converting to Machine Language
• Regardless of what language you use, you eventually need to convert
your program into machine language so that the computer can
understand it. There are two ways to do this:

• 1) Compile the program.


• 2) Interpret the program
• High-Level Programming Languages
• High-level programming languages, while simple compared to human languages, are more
complex than the languages the computer actually understands, called machine languages. Each
different type of CPU has its own unique machine language.
• Lying between machine languages and high-level languages are languages called assembly
languages. Assembly languages are similar to machine languages, but they are much easier to
program in because they allow a programmer to substitute names for numbers. Machine languages
consist of numbers only.
• Lying above high-level languages are languages called fourth-generation languages (usually
abbreviated 4GL). 4GLs are far removed from machine languages and represent the class of
computer languages closest to human languages.
• Converting to Machine Language
• Regardless of what language you use, you eventually need to convert your program into machine
language so that the computer can understand it. There are two ways to do this:
• 1) Compile the program.
2) Interpret the program.
Interpreted vs Compiled..
Python (programming language)
• Python is an interpreted, high-level, general-purpose programming
language. Created by Guido van Rossum and first released in 1991,
Python's design philosophy emphasizes code readability with its
notable use of significant whitespace. Its language constructs and
object-oriented approach aim to help programmers write clear, logical
code for small and large-scale projects.
• Python is dynamically typed and garbage-collected. It supports
multiple programming paradigms, including procedural, object-
oriented, and functional programming. Python is often described as a
"batteries included" language due to its comprehensive standard
library.
Python reserved
words

• In Python, these are


reserved words, you cannot
use them to name anything
in Python

You might also like