SD
SD
1. Programming Concepts
• Program:
A program is a set of instructions written in a specific programming language that
performs a defined task.
Examples: Calculator app, Weather app, E-commerce website.
• Types of Programming Languages
1. High-Level Languages (Closer to human language, easier to code)
▪ Examples: Python, Java, C++
2. Low-Level Languages (Closer to machine language)
▪ Machine Language: Binary code (0s and 1s)
▪ Assembly Language: Uses symbolic codes, requires an assembler
Programming Paradigms
A paradigm is a style or way of programming. Different paradigms focus on different
aspects of the programming process.
1. Procedural Programming
o Based on the concept of procedures or routines (functions)
o Follows a step-by-step approach
o Example: C
2. Functional Programming
o Focuses on mathematical functions
o Avoids changing states and mutable data
o Example: Haskell, Lisp
3. Object-Oriented Programming (OOP)
o Based on objects and classes
o Supports concepts like inheritance, encapsulation, and polymorphism
o Example: Java, Python
4. Declarative Programming
o Focuses on what the program should accomplish rather than how
o Example: SQL, HTML
5. Imperative Programming
o Focuses on how to achieve the result step by step
o Example: C, Python
Computational Thinking
Computational Thinking is a problem-solving process that involves breaking down problems
and creating step-by-step solutions.
Key Concepts:
1. Decomposition: Breaking down a complex problem into smaller parts
2. Pattern Recognition: Finding similarities or patterns
3. Abstraction: Removing unnecessary details to focus on the important parts
4. Algorithm Design: Creating a step-by-step solution
Types of statements
1. Sequence
A sequence is the simplest control structure where instructions are executed in the order they
appear. There are no conditions or loops—just a step-by-step execution.
2. Selection (Decision-Making)
Selection involves decision-making where the flow of the program depends on conditions. It
allows a program to choose different paths.
3. Iteration (Loops)
Iteration repeats a block of code multiple times based on a condition.
Algorithms
An algorithm is a finite set of instructions to solve a problem.
Key Characteristics of Algorithms:
• Input: Takes zero or more inputs
• Output: Produces at least one output
• Finiteness: Must terminate after a finite number of steps
• Definiteness: Each step is clear and unambiguous
• Effectiveness: Feasible to perform
Types of Algorithms:
1. Brute Force Algorithm: Tries all possible solutions
Example: Searching for an element in an unsorted list
2. Divide and Conquer Algorithm: Divides the problem into subproblems, solves
them, and combines the solutions
Example: Merge Sort, Binary Search
3. Greedy Algorithm: Makes the locally optimal choice at each step
Example: Kruskal’s Algorithm for Minimum Spanning Tree
4. Dynamic Programming: Solves problems by breaking them into overlapping
subproblems
Example: Fibonacci Series
5. Backtracking Algorithm: Explores all possibilities and backtracks to find the best
solution
Example: N-Queens Problem
5. Flowchart
A flowchart is a graphical representation of an algorithm using symbols. It helps visualize the
flow of control in a process.
Common Symbols in Flowcharts:
1. Oval: Start/End
2. Rectangle: Process/Instruction
3. Diamond: Decision
4. Arrow: Flowline
Example of a Simple Flowchart (for checking if a number is even or odd):
• Start → Input Number → Check if Number % 2 == 0 → Yes: Print "Even" → No:
Print "Odd" → End
6. Pseudocode
Pseudocode is a simplified, high-level description of a program that uses plain language and
basic programming constructs. It is used to plan and design algorithms before writing actual
code.
Example (Check if a number is even or odd):
mathematica
CopyEdit
Start
Input number
If number % 2 == 0 then
Print "Even"
Else
Print "Odd"
End If
End
Compilation or Interpretation
• Compiled Languages: Convert the program into machine code (e.g., C, C++)
• Interpreted Languages: Execute code line by line (e.g., Python, JavaScript)
DAY 2
1. Web Page
A single document or page on the internet that is part of a website.
• Types:
o Home Page: Main page of a website
o Landing Page: Marketing-specific, created for specific campaigns
o Content Page: Contains information like articles or blogs
2. Website
A collection of related web pages accessible through a domain name. It provides information
or services to users.
• Example: www.google.com
• Types:
o Static Website: Simple, fixed content (e.g., portfolio site)
o Dynamic Website: Content changes based on user interaction (e.g., social
media)
3. Web Application
A software program that runs on a web server and is accessed through a web browser.
• Example: Facebook, Gmail, Netflix
• Features: Interactive, user authentication, database integration
• Types:
o Single Page Application (SPA) – React, Angular
o Multi-Page Application (MPA) – Traditional websites
4. Web Fundamentals
The basic building blocks of the web, including:
• HTML (Hypertext Markup Language): Defines the structure of web pages
• CSS (Cascading Style Sheets): Styles web pages (layout, color, fonts)
• JavaScript: Adds interactivity to web pages (sliders, animations)
Other important concepts:
• HTTP/HTTPS: Communication protocol for data exchange
• DNS (Domain Name System): Resolves domain names to IP addresses
• HTTP STATUS CODE:
200 (OK)
404 (Not Found)
500 (Server Error)
5. Web Hosting
The service that allows individuals or organizations to make their website available on the
internet.
• Types of Web Hosting:
o Shared Hosting: Multiple websites on a single server (budget-friendly)
o VPS (Virtual Private Server): Dedicated resources on a virtual server
o Dedicated Server: Full server for one website (high performance)
o Cloud Hosting: Scalable, reliable hosting using cloud infrastructure