0% found this document useful (0 votes)
4 views10 pages

Programming Concepts

The document provides an overview of programming concepts, including definitions of programs, programming languages, and their classifications into low, medium, and high-level languages. It also discusses the process of debugging, types of errors, and the structure and tags of HTML, which is used for web development. Additionally, it lists important file extensions associated with various types of documents, images, audio, video, and web files.

Uploaded by

Photo Shop
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views10 pages

Programming Concepts

The document provides an overview of programming concepts, including definitions of programs, programming languages, and their classifications into low, medium, and high-level languages. It also discusses the process of debugging, types of errors, and the structure and tags of HTML, which is used for web development. Additionally, it lists important file extensions associated with various types of documents, images, audio, video, and web files.

Uploaded by

Photo Shop
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PROGRAMMING CONCEPTS

Program can be defined as a set of instructions that need to be executed to accomplish a


computing task.
A person who writes or performs the program is known as programmer.
Programmer uses some specific languages to write program which is known as
programming languages e.g. C++, Java, etc.

Programming Language
It is a set of commands, instructions and other syntax use to create a software program.

Programming language must be simple, easy to learn and use.

Programming languages are mainly categorized into three parts which are as follows

Low Level Language (LLL)


These programming languages are more difficult to understand. It is designed to operate
and handle the entire instruction set of a computer system directly which are generally
used to write the system software.
e.g. Machine language and Assembly language.
1. Machine Language It is the only language understood by the computers. Sometimes,
it referred to as machine code or object code or binary language. It is a collection of
binary digits (0 or 1) or bits that the computer reads and interprets.
2. Assembly Language It is a low level programming language which is used as an
interface with computer hardwares. It uses structured commands as substitutions for
numbers, allowing humans to read the code easier than looking at binary codes.

Medium Level Language (MLL)


It serves as the bridge between raw hardware and programming layer of a computer
system. It is designed to improve the translated code before it is executed by the
processor.

High Level Language (HLL)


It is an advanced computer programming language that is not limited to one computer,
designed for a specific job and is easier to understand.
The main advantage of high level languages over low level languages is that they are
easier to read, write and understand. e.g. BASIC, C, FORTRAN, Java, Pascal, etc.
De-Bugging
It is the process of locating and fixing or bypassing bugs (errors) in computer program
code.

Generation of Languages
The concept of language generations, sometimes called levels, is closely connected to the
advances in technology that brought about computer generations.

The five generations of language are as follows


(i) The first generation languages or 1 GLs are low level languages like machine
language.
(ii) The second generation languages or 2GLs are also low level languages that generally
consist of assembly language.
(iii) The third generation languages or 3GLs are high level languages such as Java.
(iv) The fourth generation languages or 4GLs are the languages that consist of statements
similar to the statements of human language. 4GLs are commonly used in database
programming and scripting programming.
(v) The fifth generation languages or 5GLs are programming languages that contain
visual tools, which help to develop a program. 5th Generation Programming Language
(5GL) is a high-level, constraint-based language that allows programmers to define
problem goals rather than step-by-step instructions, using principles of artificial
intelligence and natural language to solve problems more intuitively. Examples of 5GLs
include Prolog, Mercury

Error
An error in a program is called bug. It is a term used to describe any issue that arises
unexpectedly that cause a computers not function properly.
Types of Error
The types of error are classified into four categories which are as follows
1. Syntax Error When the rules of the programming language are not followed, the
compiler will show syntax error.
2. Semantic Error Semantic errors are reported by the compiler when the statements
written in the program are not meaningful to the compiler.
3. Logical Error Logical errors are those errors that occur in the output of the program.
The presence of logical errors leads to undesired or incorrect output.
4. Runtime Error Runtime errors are those errors that occur during the execution of a
program. It generally occurs due to some illegal operation performed in the program.

HTML
HTML stands for Hypertext Markup Language •
It is the markup language, used to create and design a webpage or website It requires a
program (known as browser) to display the web page .
HTML uses tags to structure the content of the webpage. ◦
It was invented by a British computer scientist, Tim Berners-Lee in 1993.
Structure of HTML
HTML is structured in a hierarchical way using various elements and tags.
• The basic structure of an HTML contains three parts
1. Main Container <html></html>
2. Head Section <head></head>
3. Body Section <body></body>
Main Container This defines the structure and content of an HTML document
◦ It is the root of an HTML document. It contains all the elements inside it.
Head Section It contains the metadata (data about data).
Body Section It contains the actual content that appears on the webpages.

HTML Tags
Tags are the building blocks used to create and structure content on a webpage.
Tags are special keywords enclosed in angle brackets eg: <html>, <body>
Two types of tags
1. Container tags : these type of tags have both an opening and closing tag. The
contains goes between the opening and closing tags. Example: heading tags <h1>
</h1>
2. Empty tags: they do not need a closing tag. These tags are also called self-closing
tags. Eg line break tag<br> , image tag<img>
Basic HTML tags
 <html>: The root element of an HTML page, which contains all other elements. It
defines the document as an HTML file.
 <head>: Contains metadata about the HTML document, such as the title, links to
stylesheets, and scripts. It’s not displayed on the page itself.
 <title>: Sets the title of the webpage, which appears in the browser tab and is
important for SEO(search engine optimization).
 <body>: Contains the visible content of the webpage, like text, images, and links that
users see and interact with.
<body style="background-color: lightblue;">
 <h1> to <h6>: Heading tags used to define headings, with <h1> being the largest and
most important, down to <h6> as the smallest.
<h1 style="color:blue;">This is a heading</h1>
<h1 style="font-family:verdana;">This is a heading</h1>
<h1 style="font-size:300%;">This is a heading</h1>
<h1 style="text-align:center;">Centered Heading</h1>
 <p>: Defines a paragraph of text, creating a block of content separated from other
elements.
 <a>: Creates a hyperlink to another webpage or resource, using the href attribute (e.g.,
<a href="[Link]
 <img>: Inserts an image into the page, requiring a src attribute for the image URL and
an alt attribute for accessibility (e.g., <img src="[Link]" alt="description">).
 <ul>: Defines an unordered (bulleted) list, often used with <li> tags for list items.
 <ol>: Defines an ordered (numbered) list, also used with <li> tags for list items.
 <li>: Represents a list item within <ul> or <ol>.
 <div>: A block-level container used to group other HTML elements for styling or
layout purposes.
 <span>: An inline container used to group inline elements for styling or manipulation.
 <br>: Inserts a line break, moving content to the next line.
 <hr>: Creates a horizontal line to separate content.
 <table>: Defines a table, used to organize data into rows and columns.
 <tr>: Represents a table row within a <table> element.
Some important file extension in Windows.
Text & Documents
 .DOC/.DOCX: Microsoft Word documents.
 .TXT: Plain text files.
 .PDF: Portable Document Format, for documents that are difficult to edit but easy to
share.
 .ODT: OpenDocument Text, an open-source alternative to Word.
Images
 .JPG/JPEG: Common format for photographs.
 .PNG: Popular format for graphics, supporting transparency.
 .BMP: Bitmap image files.
 .GIF: Graphical Interchange Format, often used for simple animations.
Audio & Video
 .MP3: A widely used format for music files.
 .WAV: Standard audio format.
 .MP4: A popular container format for video and audio.
 .AVI: Audio Video Interleave, an older video container format.
Web
 .HTML/.HTM: Files for web pages, written in Hypertext Markup Language.
 .CSS: Cascading Style Sheets, used to style web pages.
 .JS: JavaScript files, used for interactive website features.
Executable & System
 .EXE: Executable files for running programs on Windows.
 .DLL: Dynamic Link Libraries, a type of executable file for Windows.
 .SYS: System files on Windows.
Compressed Files
 .ZIP: A common format for compressing and archiving files.
 .RAR: A compressed archive file format, commonly associated with WinRAR.
Other Important Types
 .XLS/.XLSX: Microsoft Excel spreadsheet files.
 .PPT/.PPTX: Microsoft PowerPoint presentation files.
 .CSV: Comma-Separated Values, used for storing tabular data.
 .INI: Initialization or configuration files.

You might also like