NPTEL
PRESENTATION BY:
AJIT SHRIVAS
AKSHAT SINGH PARMAR
ANSHUL SONI
HIMANSHU KHUSHWAHA
The JOY OF
Computing
with Python
2
2
Week 1
o1. Why Programming ?
o3. Introduction to
o2. Importance of clear instructions.
By - ANSHUL
3
Why Programming ?
1. Digital world relies on programs.
2. Programming makes life simpler and faster.
3. Examples of daily life use (train
reservations, apps).
4. Almost everything today involves
programming.
5. Digital world is built on code and
programs.
Importance of clear
instructions !
Importance of clear, unambiguous instructions
1. Instructions help accomplish tasks, whether fo
people or computers.
2. Clarity in instructions ensures successful
execution.
3. Computers excel at fast task completion when
instructed clearly.
Introduction to Scratch
o Scratch is an online programming platform
designed to teach programming concepts in a fun
and interactive way.
o It's suitable for all ages but is particularly
beginner-friendly.
o Scratch uses a block-based coding system,
making it easy to learn and understand.
o Scratch allows you to create animations, games,
stories, and interactive projects by snapping
together code blocks.
6
6
6
Week 2
o1. Introduction
to
o3. Introduction to LOOPS
o2. Writing Your First Program
∞
By - AJIT
Introduction to
• Anaconda is a comprehensive platform for Python
programming.
• It serves as an integrated development environment (IDE) for
Python.
• Anaconda is well-suited for beginners and professionals,
offering a user-friendly interface.
• It includes a vast collection of pre-installed Python libraries and
tools.
• Anaconda is widely used in data science, machine learning,
and scientific computing.
Writing Your First Program !
Print Command: Displays output on the screen.
Input and IDE: Learn how to take input from the keyboard and use an
integrated development environment (IDE) like Spyder for Python
programming.
Coding in Spyder: Understand the process of writing and executing Python
code in Spyder's console.
Incrementing Variables: Practice setting variables and incrementing values
within your code.
Executing Code: Explore ways to run code either line by line or as a complete
script.
Python for Beginners: Python is an ideal language for newcomers, and we'll
gradually progress to more advanced topics and applications.
Introduction to LOOPS
∞
Looping Magic: Loops are like magic spells for automating repetitive tasks in Python.
For Loop Recipe: Think of a for loop as a recipe with ingredients: a range, a colon, and indentation.
Changing Ingredients: A loop uses a special variable that changes each time, like switching
ingredients in a recipe.
Tables Made Easy: Loops create lists effortlessly, like making multiplication tables.
Practice Pays Off: Loop mastery comes with practice, so don't fret if it feels tricky at first. Enjoy the
learning process!
10
10
10
Week 3
o1. Introduction to Crowd
Computing
o2. THEORY OF EVOLUTION
Introduction to Crowd Computing
"Unlocking the Wisdom of the Crowd"
Crowd Computing – Harnessing Collective Wisdom
• The Power of Crowd: Crowd computing is the art of tapping into the collective knowledge and skills of a
group of people.
• A Simple Query: Have a question? Post it on a platform like Facebook or Quora, and the crowd can help you
find answers quickly.
• Estimating Numbers: When it comes to estimating things, the collective guesses of many individuals can
often be astonishingly accurate.
• Wisdom in Numbers: The "wisdom of crowds" shows that collective opinions often outperform individual
experts.
• Wikipedia vs. Britannica: Wikipedia, curated by crowds, has been found to be as reliable as expert-curated
Britannica.
• Collective Collaboration: Crowd computing enables us to collectively solve problems, make accurate
estimates, and accumulate knowledge.
Analyzing Crowd Estimates with Python
1.Import Libraries
1. Import Matplotlib for data visualization.
2. Import the Statistics library for mean and median calculations.
2.Plot Estimates
1. Plot crowd estimates on the graph.
2. Use constant values on the y-axis for discrete representation.
3.Trim Data
1. Trim 10% of the smallest and largest estimate values to reduce outliers.
4.Visualize Actual Value
1. Plot the actual value as a reference (e.g., 375) using a distinct marker (e.g., green triangles).
5.Calculate Aggregate Measures
1. Compute the mean and median of trimmed estimates.
2. Represent mean with red dots and median with blue squares on the graph.
6.Analyze Results
1. Evaluate which aggregate measure is closest to the actual value for the most accurate estimate.
Theory of Evolution & Genetic Algorithms
1. Evolution Basics
1. Life evolves from simple forms (e.g., amoeba) to complex species (e.g., Homo sapiens).
2. The process of evolution involves randomness and gradual changes over millions of years.
2. Genetic Algorithms
1. Genetic algorithms are inspired by evolution and biology.
2. They mimic the evolutionary process to solve complex problems.
3. Binary String Simulation
1. Start with a 20-digit binary string (all zeros).
2. Randomly select digits to flip from 0 to 1 with a given probability.
4. Simulation Outcome
1. The time for all zeros to become ones depends on string length and probability.
2. Demonstrates the concept of gradual changes and adaptation, as in biological evolution.
5. Interest in Genetic Algorithms
1. Genetic algorithms offer advanced problem-solving techniques.
2. Encourages further exploration for those interested in programming and biology.
14
14
14
Week 4
o1. Magic Squares
o2. Types of Magic Squares
MAGIC SQUARES
•Introduction:Magic squares are fascinating mathematical puzzles with constant sums in rows, columns,
and diagonals.
•Visual Representation:
• Features of a Magic Square:
• In a magic square, all rows, columns, and diagonals have the same sum.
• There are various sizes of magic squares, but we're exploring the classic 3x3 magic square
today.
• Historical Significance: Magic squares have captivated mathematicians and artists for
centuries and can be found in ancient manuscripts, art, and even modern puzzles.
Types of MAGIC SQUARES
•Introduction: Magic squares are classified into two main types based on their order.
•Types: the two main types:
•Odd Order Magic Squares (e.g., 3x3)
•Singly Even Order Magic Squares (e.g., 4x4)
17
17
17
Week 5
o1. SEARCHING ALGORITHMS
o2. SORTING ALGORITHMS
SEARCHING AND SORTING ALGORITHMS WITH PYTHON
• Understanding searching and sorting algorithms is essential for any
programmer. These algorithms help to optimize code and improve
program efficiency. Python provides a wide range of built-in
functions and libraries that make it easy to implement these
algorithms. By mastering these algorithms, programmers can
improve their problem- solving skills and become better at writing
efficient and optimized code
1. SEARCHING ALGORITHMS
•1. Linear Search: Compare linear search with other
searching algorithms and discuss its best and worst- case
time complexity.
•2. Binary Search: Implement and compare the
performance of binary search in various data structures such
as arrays, lists, and trees.
2.SORTING ALGORITHMS
•Bubble Sort: Bubble sort is a simple sorting algorithm that repeatedly steps
through the list, compares adjacent elements and swaps them if they are in the
wrong order. The pass through the list is repeated until the list is sorted.
• Merge Sort: Merge sort is a popular sorting algorithm that uses the divide
and conquer strategy to sort an array or list of elements. It works by dividing the
list into smaller sub-lists, sorting those sub-lists recursively, and then merging
them back together to form the final sorted list.
21
21
21
Week 6
o1. RECURSION IN PYTHON
o2. ADVANTAGES & DISADVANTAGES
1. RECURSION IN PYTHON
•The term Recursion can be defined as the process of defining something in
terms of itself. In simple words, it is a process in which a function calls itself
directly or indirectly.
•Recursion in Python is a programming technique in which a function calls itself
to solve a problem by breaking it down into smaller, more manageable
subproblems. Recursion is a fundamental concept in computer science and is
used in a wide range of algorithms and problem-solving scenarios.
2. Advantages and Disadvantages of using recursion
 Advantages of using recursion
•A complicated function can be split down into smaller sub-problems utilizing recursion.
•Sequence creation is simpler through recursion than utilizing any nested iteration.
•Recursive functions render the code look simple and effective.
 Disadvantages of using recursion
•A lot of memory and time is taken through recursive calls which makes it expensive for
use.
•Recursive functions are challenging to debug.
•The reasoning behind recursion can sometimes be tough to think through
24
24
24
Week 7
o1. SNAKE AND LADDER
 SNAKE AND LADDER
1. Game Initialization:
The game starts with two players positioned at square 0 on the board.
2. Rolling the Die:
The roll die() function simulates rolling a six-sided die, providing a random
number between 1 and 6.
3. Player Turn:
The play turn() function is responsible for simulating a player's turn . It rolls the
die, updates the player's position, and checks for snakes and ladders
4. Snakes and Ladders Configuration:
The snakes and ladders are defined using dictionaries, where the keys represent
the head of a snake or the bottom of a ladder, and the values represent the tail of
the snake or the top of the ladder.
27
27
27
Week 8
o1. LOTTERY SIMULATION
 LOTTERY SIMULATION
1. Import Necessary Libraries:
Start by importing any required libraries, such as ‘ random ‘ for generating random numbers. You may also need
other modules depending on the specific requirements .
2. Generate Lottery Tickets:
Generate lottery tickets for participants. Each ticket should contain a unique combination of numbers within the
specified range .
3. Simulate the Drawing:
Simulate the drawing of winning numbers.
4. Check for Winners:
Compare the winning numbers with the numbers on each participant's ticket to determine the winners.
 PROGRAM IN PYTHON
ANAGRAMS
Anagrams are words or phrases formed by rearranging the letters
of another word or phrase, using all the original letters exactly
once. For instance, "listen" and "silent" are anagrams.
PROGRAM TO CHECK ANAGRAMS
32
32
32
Week 9
o1. INTRODUCTION TO NETWORKX
o2. SIX DEGREES OF SEPARATION
 INTRODUCTION TO NETWORKX
NetworkX is a Python library for the creation, manipulation, and analysis of complex networks.
Why NetworkX?:
v Essential for studying real-world systems, like social networks, transportation, and more.
v Easy to use and integrate into your Python projects.
Key Features:
v Create, modify, and visualize networks.
v Algorithms for network analysis, e.g., centrality and connectivity.
v Flexible data structures for graphs and digraphs.-
Use Cases:
v Social Network Analysis
v Infrastructure and Transportation Planning
v Biological Network Analysis
v Recommender Systems
 SIX DEGREES OF SEPARATION
Six Degrees of Separation - The theory that everyone is connected to every other person on the planet by a
chain of connections with no more than six intermediaries.
Python's Role - Python, with its rich libraries, can help explore this theory.
Key Steps -
v Data Collection - Collect relevant data, e.g., social network connections.
v Network Analysis - Use libraries like NetworkX to create a graph.
v Path Finding - Find the shortest path between two individuals.
v Verification - Validate the theory by finding paths between random individuals.
Applications - Social network analysis, recommendation systems, and more.
Conclusion - Python's libraries make exploring the Six Degrees of Separation concept accessible and actionable.
35
35
35
Week 10
o1. DATA COMPRESSION
• DATA COMPRESSION
NumPy is a powerful library for numerical operations in Python. Here are some key
points related to NumPy:
1. NumPy provides a powerful array object, numpy.array , which allows for
efficient manipulation of large datasets of numerical data.
2. It supports a variety of numerical operations such as arithmetic, statistical, and
linear algebraic operations.
3. NumPy enables the creation of multidimensional arrays (matrices), which is particularly
useful for representing and manipulating data in scientific computing and data analysis.
4. Arrays in NumPy can have any number of dimensions, and they are homogeneous
(all elements of the same type).
 COMMANDS IN NUMPY
1. Importing
NumPy:
import numpy as np
2. Creating a 1D array:
arr_1d = np.array([1, 2, 3])
3. Creating a 2D array (matrix)
arr_2d = np.array([[1, 2, 3], [4, 5,
6]])
4. Creating arrays with zeros or
ones:
zeros_arr = np.zeros((3, 4))
ones_arr = np.ones((2, 2))
 COMMANDS IN NUMPY
5. Element-wise operations:
a = np.array([1, 2, 3])
b = np.array([4, 5, 6])
c = a + b
6. Matrix multiplication:
matrix_a = np.array([[1, 2], [3, 4]])
matrix_b = np.array([[5, 6], [7, 8]])
result = np.dot(matrix_a, matrix_b)
7. Indexing and Slicing:
arr = np.array([[1, 2, 3], [4, 5, 6], [7,8,9]])
element = arr[0, 1] # Accessing an element
row = arr[1] # Accessing a row
column = arr[:, 2] # Accessing a column
39
39
39
Week 11
o1. WHATSAPP BROWSER AUTOMATION
o2. FUN WITH CALENDAR USING PYTHON
WHATSAPP BROWSER AUTOMATION
• WHATSAPP BROWSER AUTOMATION USING PYTHON TYPICALLY INVOLVES
THE USE OF THE SELENIUM LIBRARY. SELENIUM ALLOWS YOU TO CONTROL
WEB BROWSERS PROGRAMMATICALLY, MAKING IT AN EXCELLENT CHOICE
FOR AUTOMATING WHATSAPP WEB.
• SELENIUM REQUIRES A WEB DRIVER TO INTERFACE WITH THE CHOSEN
BROWSER. WEB DRIVERS IS A PACKAGE TO INTERACT WITH A WEB
BROWSER. IT INTERACTS WITH THE WEB BROWSER OR A REMOTE WEB
SERVER THROUGH A WIRE PROTOCOL WHICH IS COMMON TO ALL.
• FUN WITH CALENDAR USING PYTHON
"FUN WITH CALENDAR" USING PYTHON INVOLVES WORKING
WITH DATES, TIMES, AND CALENDARS TO CREATE, MANIPULATE,
AND MANAGE EVENTS AND SCHEDULES. PYTHON PROVIDES
POWERFUL LIBRARIES LIKE DATETIME AND CALENDAR TO WORK
WITH DATES AND TIMES.
42
42
42
Week 12
o1
.
PAGE RANK
PAGE RANK
PAGERANK IS AN ALGORITHM USED BY SEARCH ENGINES, LIKE GOOGLE, TO
RANK WEB PAGES.
• IT WAS DEVELOPED BY LARRY PAGE AND SERGEY BRIN, CO-FOUNDERS OF GOOGLE, IN THE
LATE 1990S.
• PAGERANK IS CRUCIAL FOR DETERMINING THE QUALITY AND RELEVANCE OF WEB PAGES
IN SEARCH ENGINE RESULTS.
• IT HELPS SEARCH ENGINES IDENTIFY AUTHORITATIVE AND TRUSTWORTHY PAGES.
• PAGERANK IS BASED ON THE IDEA OF LINK ANALYSIS AND USES A
MATHEMATICAL FORMULA TO ASSIGN SCORES TO WEB PAGES.
• IT IS A RECURSIVE ALGORITHM WHERE THE IMPORTANCE OF A PAGE IS DETERMINED BY
THE IMPORTANCE OF THE PAGES LINKING TO IT.
• PAGERANK CAN BE REPRESENTED USING MATRICES WHERE
ELEMENTS DENOTE LINK RELATIONSHIPS BETWEEN PAGES.
• THE PAGERANK FORMULA CAN BE EXPRESSED AS A MATRIX EQUATION.
• PAGERANK IS NOT LIMITED TO SEARCH ENGINES; IT HAS APPLICATIONS
IN VARIOUS FIELDS LIKE SOCIAL NETWORK ANALYSIS AND
RECOMMENDATION SYSTEMS.
• PAGERANK MAY BE MANIPULATED OR INFLUENCED BY VARIOUS MEANS.
• IT IS JUST ONE OF MANY FACTORS SEARCH ENGINES USE TO RANK PAGES.
Thank you
By –
AJIT SHRIVAS | 0901MC221004
AKSHAT SING PARMAR | 0901MC221005
ANSHUL SONI | 0901MC221013
HIMANSHU KUSHWAH | 0901MC221037
Submitted to: Prof. Divya
Chaturvedi

NPTEL complete.pptx.pptx

  • 1.
    NPTEL PRESENTATION BY: AJIT SHRIVAS AKSHATSINGH PARMAR ANSHUL SONI HIMANSHU KHUSHWAHA The JOY OF Computing with Python
  • 2.
    2 2 Week 1 o1. WhyProgramming ? o3. Introduction to o2. Importance of clear instructions. By - ANSHUL
  • 3.
    3 Why Programming ? 1.Digital world relies on programs. 2. Programming makes life simpler and faster. 3. Examples of daily life use (train reservations, apps). 4. Almost everything today involves programming. 5. Digital world is built on code and programs.
  • 4.
    Importance of clear instructions! Importance of clear, unambiguous instructions 1. Instructions help accomplish tasks, whether fo people or computers. 2. Clarity in instructions ensures successful execution. 3. Computers excel at fast task completion when instructed clearly.
  • 5.
    Introduction to Scratch oScratch is an online programming platform designed to teach programming concepts in a fun and interactive way. o It's suitable for all ages but is particularly beginner-friendly. o Scratch uses a block-based coding system, making it easy to learn and understand. o Scratch allows you to create animations, games, stories, and interactive projects by snapping together code blocks.
  • 6.
    6 6 6 Week 2 o1. Introduction to o3.Introduction to LOOPS o2. Writing Your First Program ∞ By - AJIT
  • 7.
    Introduction to • Anacondais a comprehensive platform for Python programming. • It serves as an integrated development environment (IDE) for Python. • Anaconda is well-suited for beginners and professionals, offering a user-friendly interface. • It includes a vast collection of pre-installed Python libraries and tools. • Anaconda is widely used in data science, machine learning, and scientific computing.
  • 8.
    Writing Your FirstProgram ! Print Command: Displays output on the screen. Input and IDE: Learn how to take input from the keyboard and use an integrated development environment (IDE) like Spyder for Python programming. Coding in Spyder: Understand the process of writing and executing Python code in Spyder's console. Incrementing Variables: Practice setting variables and incrementing values within your code. Executing Code: Explore ways to run code either line by line or as a complete script. Python for Beginners: Python is an ideal language for newcomers, and we'll gradually progress to more advanced topics and applications.
  • 9.
    Introduction to LOOPS ∞ LoopingMagic: Loops are like magic spells for automating repetitive tasks in Python. For Loop Recipe: Think of a for loop as a recipe with ingredients: a range, a colon, and indentation. Changing Ingredients: A loop uses a special variable that changes each time, like switching ingredients in a recipe. Tables Made Easy: Loops create lists effortlessly, like making multiplication tables. Practice Pays Off: Loop mastery comes with practice, so don't fret if it feels tricky at first. Enjoy the learning process!
  • 10.
    10 10 10 Week 3 o1. Introductionto Crowd Computing o2. THEORY OF EVOLUTION
  • 11.
    Introduction to CrowdComputing "Unlocking the Wisdom of the Crowd" Crowd Computing – Harnessing Collective Wisdom • The Power of Crowd: Crowd computing is the art of tapping into the collective knowledge and skills of a group of people. • A Simple Query: Have a question? Post it on a platform like Facebook or Quora, and the crowd can help you find answers quickly. • Estimating Numbers: When it comes to estimating things, the collective guesses of many individuals can often be astonishingly accurate. • Wisdom in Numbers: The "wisdom of crowds" shows that collective opinions often outperform individual experts. • Wikipedia vs. Britannica: Wikipedia, curated by crowds, has been found to be as reliable as expert-curated Britannica. • Collective Collaboration: Crowd computing enables us to collectively solve problems, make accurate estimates, and accumulate knowledge.
  • 12.
    Analyzing Crowd Estimateswith Python 1.Import Libraries 1. Import Matplotlib for data visualization. 2. Import the Statistics library for mean and median calculations. 2.Plot Estimates 1. Plot crowd estimates on the graph. 2. Use constant values on the y-axis for discrete representation. 3.Trim Data 1. Trim 10% of the smallest and largest estimate values to reduce outliers. 4.Visualize Actual Value 1. Plot the actual value as a reference (e.g., 375) using a distinct marker (e.g., green triangles). 5.Calculate Aggregate Measures 1. Compute the mean and median of trimmed estimates. 2. Represent mean with red dots and median with blue squares on the graph. 6.Analyze Results 1. Evaluate which aggregate measure is closest to the actual value for the most accurate estimate.
  • 13.
    Theory of Evolution& Genetic Algorithms 1. Evolution Basics 1. Life evolves from simple forms (e.g., amoeba) to complex species (e.g., Homo sapiens). 2. The process of evolution involves randomness and gradual changes over millions of years. 2. Genetic Algorithms 1. Genetic algorithms are inspired by evolution and biology. 2. They mimic the evolutionary process to solve complex problems. 3. Binary String Simulation 1. Start with a 20-digit binary string (all zeros). 2. Randomly select digits to flip from 0 to 1 with a given probability. 4. Simulation Outcome 1. The time for all zeros to become ones depends on string length and probability. 2. Demonstrates the concept of gradual changes and adaptation, as in biological evolution. 5. Interest in Genetic Algorithms 1. Genetic algorithms offer advanced problem-solving techniques. 2. Encourages further exploration for those interested in programming and biology.
  • 14.
    14 14 14 Week 4 o1. MagicSquares o2. Types of Magic Squares
  • 15.
    MAGIC SQUARES •Introduction:Magic squaresare fascinating mathematical puzzles with constant sums in rows, columns, and diagonals. •Visual Representation: • Features of a Magic Square: • In a magic square, all rows, columns, and diagonals have the same sum. • There are various sizes of magic squares, but we're exploring the classic 3x3 magic square today. • Historical Significance: Magic squares have captivated mathematicians and artists for centuries and can be found in ancient manuscripts, art, and even modern puzzles.
  • 16.
    Types of MAGICSQUARES •Introduction: Magic squares are classified into two main types based on their order. •Types: the two main types: •Odd Order Magic Squares (e.g., 3x3) •Singly Even Order Magic Squares (e.g., 4x4)
  • 17.
    17 17 17 Week 5 o1. SEARCHINGALGORITHMS o2. SORTING ALGORITHMS
  • 18.
    SEARCHING AND SORTINGALGORITHMS WITH PYTHON • Understanding searching and sorting algorithms is essential for any programmer. These algorithms help to optimize code and improve program efficiency. Python provides a wide range of built-in functions and libraries that make it easy to implement these algorithms. By mastering these algorithms, programmers can improve their problem- solving skills and become better at writing efficient and optimized code
  • 19.
    1. SEARCHING ALGORITHMS •1.Linear Search: Compare linear search with other searching algorithms and discuss its best and worst- case time complexity. •2. Binary Search: Implement and compare the performance of binary search in various data structures such as arrays, lists, and trees.
  • 20.
    2.SORTING ALGORITHMS •Bubble Sort:Bubble sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order. The pass through the list is repeated until the list is sorted. • Merge Sort: Merge sort is a popular sorting algorithm that uses the divide and conquer strategy to sort an array or list of elements. It works by dividing the list into smaller sub-lists, sorting those sub-lists recursively, and then merging them back together to form the final sorted list.
  • 21.
    21 21 21 Week 6 o1. RECURSIONIN PYTHON o2. ADVANTAGES & DISADVANTAGES
  • 22.
    1. RECURSION INPYTHON •The term Recursion can be defined as the process of defining something in terms of itself. In simple words, it is a process in which a function calls itself directly or indirectly. •Recursion in Python is a programming technique in which a function calls itself to solve a problem by breaking it down into smaller, more manageable subproblems. Recursion is a fundamental concept in computer science and is used in a wide range of algorithms and problem-solving scenarios.
  • 23.
    2. Advantages andDisadvantages of using recursion  Advantages of using recursion •A complicated function can be split down into smaller sub-problems utilizing recursion. •Sequence creation is simpler through recursion than utilizing any nested iteration. •Recursive functions render the code look simple and effective.  Disadvantages of using recursion •A lot of memory and time is taken through recursive calls which makes it expensive for use. •Recursive functions are challenging to debug. •The reasoning behind recursion can sometimes be tough to think through
  • 24.
  • 25.
     SNAKE ANDLADDER 1. Game Initialization: The game starts with two players positioned at square 0 on the board. 2. Rolling the Die: The roll die() function simulates rolling a six-sided die, providing a random number between 1 and 6. 3. Player Turn: The play turn() function is responsible for simulating a player's turn . It rolls the die, updates the player's position, and checks for snakes and ladders 4. Snakes and Ladders Configuration: The snakes and ladders are defined using dictionaries, where the keys represent the head of a snake or the bottom of a ladder, and the values represent the tail of the snake or the top of the ladder.
  • 27.
  • 28.
     LOTTERY SIMULATION 1.Import Necessary Libraries: Start by importing any required libraries, such as ‘ random ‘ for generating random numbers. You may also need other modules depending on the specific requirements . 2. Generate Lottery Tickets: Generate lottery tickets for participants. Each ticket should contain a unique combination of numbers within the specified range . 3. Simulate the Drawing: Simulate the drawing of winning numbers. 4. Check for Winners: Compare the winning numbers with the numbers on each participant's ticket to determine the winners.
  • 29.
  • 30.
    ANAGRAMS Anagrams are wordsor phrases formed by rearranging the letters of another word or phrase, using all the original letters exactly once. For instance, "listen" and "silent" are anagrams.
  • 31.
  • 32.
    32 32 32 Week 9 o1. INTRODUCTIONTO NETWORKX o2. SIX DEGREES OF SEPARATION
  • 33.
     INTRODUCTION TONETWORKX NetworkX is a Python library for the creation, manipulation, and analysis of complex networks. Why NetworkX?: v Essential for studying real-world systems, like social networks, transportation, and more. v Easy to use and integrate into your Python projects. Key Features: v Create, modify, and visualize networks. v Algorithms for network analysis, e.g., centrality and connectivity. v Flexible data structures for graphs and digraphs.- Use Cases: v Social Network Analysis v Infrastructure and Transportation Planning v Biological Network Analysis v Recommender Systems
  • 34.
     SIX DEGREESOF SEPARATION Six Degrees of Separation - The theory that everyone is connected to every other person on the planet by a chain of connections with no more than six intermediaries. Python's Role - Python, with its rich libraries, can help explore this theory. Key Steps - v Data Collection - Collect relevant data, e.g., social network connections. v Network Analysis - Use libraries like NetworkX to create a graph. v Path Finding - Find the shortest path between two individuals. v Verification - Validate the theory by finding paths between random individuals. Applications - Social network analysis, recommendation systems, and more. Conclusion - Python's libraries make exploring the Six Degrees of Separation concept accessible and actionable.
  • 35.
  • 36.
    • DATA COMPRESSION NumPyis a powerful library for numerical operations in Python. Here are some key points related to NumPy: 1. NumPy provides a powerful array object, numpy.array , which allows for efficient manipulation of large datasets of numerical data. 2. It supports a variety of numerical operations such as arithmetic, statistical, and linear algebraic operations. 3. NumPy enables the creation of multidimensional arrays (matrices), which is particularly useful for representing and manipulating data in scientific computing and data analysis. 4. Arrays in NumPy can have any number of dimensions, and they are homogeneous (all elements of the same type).
  • 37.
     COMMANDS INNUMPY 1. Importing NumPy: import numpy as np 2. Creating a 1D array: arr_1d = np.array([1, 2, 3]) 3. Creating a 2D array (matrix) arr_2d = np.array([[1, 2, 3], [4, 5, 6]]) 4. Creating arrays with zeros or ones: zeros_arr = np.zeros((3, 4)) ones_arr = np.ones((2, 2))
  • 38.
     COMMANDS INNUMPY 5. Element-wise operations: a = np.array([1, 2, 3]) b = np.array([4, 5, 6]) c = a + b 6. Matrix multiplication: matrix_a = np.array([[1, 2], [3, 4]]) matrix_b = np.array([[5, 6], [7, 8]]) result = np.dot(matrix_a, matrix_b) 7. Indexing and Slicing: arr = np.array([[1, 2, 3], [4, 5, 6], [7,8,9]]) element = arr[0, 1] # Accessing an element row = arr[1] # Accessing a row column = arr[:, 2] # Accessing a column
  • 39.
    39 39 39 Week 11 o1. WHATSAPPBROWSER AUTOMATION o2. FUN WITH CALENDAR USING PYTHON
  • 40.
    WHATSAPP BROWSER AUTOMATION •WHATSAPP BROWSER AUTOMATION USING PYTHON TYPICALLY INVOLVES THE USE OF THE SELENIUM LIBRARY. SELENIUM ALLOWS YOU TO CONTROL WEB BROWSERS PROGRAMMATICALLY, MAKING IT AN EXCELLENT CHOICE FOR AUTOMATING WHATSAPP WEB. • SELENIUM REQUIRES A WEB DRIVER TO INTERFACE WITH THE CHOSEN BROWSER. WEB DRIVERS IS A PACKAGE TO INTERACT WITH A WEB BROWSER. IT INTERACTS WITH THE WEB BROWSER OR A REMOTE WEB SERVER THROUGH A WIRE PROTOCOL WHICH IS COMMON TO ALL.
  • 41.
    • FUN WITHCALENDAR USING PYTHON "FUN WITH CALENDAR" USING PYTHON INVOLVES WORKING WITH DATES, TIMES, AND CALENDARS TO CREATE, MANIPULATE, AND MANAGE EVENTS AND SCHEDULES. PYTHON PROVIDES POWERFUL LIBRARIES LIKE DATETIME AND CALENDAR TO WORK WITH DATES AND TIMES.
  • 42.
  • 43.
    PAGE RANK PAGERANK ISAN ALGORITHM USED BY SEARCH ENGINES, LIKE GOOGLE, TO RANK WEB PAGES. • IT WAS DEVELOPED BY LARRY PAGE AND SERGEY BRIN, CO-FOUNDERS OF GOOGLE, IN THE LATE 1990S. • PAGERANK IS CRUCIAL FOR DETERMINING THE QUALITY AND RELEVANCE OF WEB PAGES IN SEARCH ENGINE RESULTS. • IT HELPS SEARCH ENGINES IDENTIFY AUTHORITATIVE AND TRUSTWORTHY PAGES. • PAGERANK IS BASED ON THE IDEA OF LINK ANALYSIS AND USES A MATHEMATICAL FORMULA TO ASSIGN SCORES TO WEB PAGES. • IT IS A RECURSIVE ALGORITHM WHERE THE IMPORTANCE OF A PAGE IS DETERMINED BY THE IMPORTANCE OF THE PAGES LINKING TO IT.
  • 44.
    • PAGERANK CANBE REPRESENTED USING MATRICES WHERE ELEMENTS DENOTE LINK RELATIONSHIPS BETWEEN PAGES. • THE PAGERANK FORMULA CAN BE EXPRESSED AS A MATRIX EQUATION. • PAGERANK IS NOT LIMITED TO SEARCH ENGINES; IT HAS APPLICATIONS IN VARIOUS FIELDS LIKE SOCIAL NETWORK ANALYSIS AND RECOMMENDATION SYSTEMS. • PAGERANK MAY BE MANIPULATED OR INFLUENCED BY VARIOUS MEANS. • IT IS JUST ONE OF MANY FACTORS SEARCH ENGINES USE TO RANK PAGES.
  • 45.
    Thank you By – AJITSHRIVAS | 0901MC221004 AKSHAT SING PARMAR | 0901MC221005 ANSHUL SONI | 0901MC221013 HIMANSHU KUSHWAH | 0901MC221037 Submitted to: Prof. Divya Chaturvedi