INTRODUCTION TO SELECTION SORT AND WORKING OF SELECTION SORT
TO WATCH VIDEO:
https://youtu.be/RlLn7tMiD3g
TO DOWNLOAD PDF:
https://computerassignmentsforu.blogspot.com/p/classxiiselectionsort.html
The document discusses the time complexity of the simplex algorithm for solving linear programming problems. It begins by defining time complexity as the number of arithmetic operations required to solve a problem. It then provides an overview of different time complexities such as polynomial time and exponential time. The rest of the document focuses on using geometric interpretations to understand the simplex algorithm and analyze cases where it exhibits exponential running time. It illustrates concepts like the region of feasibility and simplex pivoting through examples. It also reviews the Klee-Minty example, which shows that the simplex algorithm can require an exponential number of iterations in the worst case.
The document discusses asymptotic analysis and big-O, Ω, and Θ notation for analyzing how algorithms scale with increasing input size. It defines asymptotic analysis as depicting the running time of an algorithm as the input size increases without bound. It provides examples of using asymptotic notation to classify functions based on their growth rates and compares the orders of common functions like n, n2, n3, logn.
The document describes the graphical method for solving linear programming problems with two decision variables. It provides the step-by-step procedure which involves plotting the constraints on a graph to identify the feasible region, determining the corner points of this region which represent the feasible solutions, substituting these points into the objective function to find the optimal value, and identifying the optimal solution. It then provides examples demonstrating this process and different types of solutions that can arise such as unbounded, infeasible, and optimal.
This document provides summaries of common special functions and polynomials, including Legendre polynomials, associated Legendre functions, Bessel functions, spherical Bessel functions, Hermite polynomials, and Laguerre polynomials. It defines the differential equations that govern each function, provides generating functions, discusses orthogonality properties, and lists some important recurrence relations and examples. The document is intended as a short survey of essential properties of these important mathematical functions.
The document provides instructions on how to take derivatives of functions when there are surds, fractional powers, or multiple terms. It demonstrates cunningly changing the subject of the formula to put powers or surds on top before taking the derivative. Examples are provided such as finding the derivative of y=√x by changing it to y=x1/2 and then taking the derivative. Strategies are also shown for breaking down derivatives of terms combined with addition or multiplication such as y=x4+2x2+4.
Operation research - the revised simplex method2013901097
This document provides examples of using the revised simplex method to solve linear programming problems. Example 1 walks through applying the method step-by-step to a multi-variable problem. It shows setting up the initial tableau, finding the entering and leaving variables, and updating the basis matrix at each iteration until an optimal solution is reached. Example 2 solves a problem with artificial variables using the two-phase method. It demonstrates writing the problem in standard and canonical form, and iteratively choosing entering/leaving variables and updating the basis matrix over two iterations to find the optimal solution.
This document discusses linear programming iterative methods. It introduces the simplex method, two-phase simplex method, and Big M method. An example problem is provided to illustrate solving a linear programming problem using these iterative methods. The problem involves maximizing profit from producing tables and chairs given resource constraints. The problem is formulated and solved using the simplex method in multiple steps.
The document discusses integration, which is the reverse process of differentiation. It provides formulas for integrating polynomial expressions like xn and axn and explains how to find the constant of integration C. Examples are given for integrating expressions and finding the area under a curve by integrating between limits of integration.
The document discusses the time complexity of the simplex algorithm for solving linear programming problems. It begins by defining time complexity as the number of arithmetic operations required to solve a problem. It then provides an overview of different time complexities such as polynomial time and exponential time. The rest of the document focuses on using geometric interpretations to understand the simplex algorithm and analyze cases where it exhibits exponential running time. It illustrates concepts like the region of feasibility and simplex pivoting through examples. It also reviews the Klee-Minty example, which shows that the simplex algorithm can require an exponential number of iterations in the worst case.
The document discusses asymptotic analysis and big-O, Ω, and Θ notation for analyzing how algorithms scale with increasing input size. It defines asymptotic analysis as depicting the running time of an algorithm as the input size increases without bound. It provides examples of using asymptotic notation to classify functions based on their growth rates and compares the orders of common functions like n, n2, n3, logn.
The document describes the graphical method for solving linear programming problems with two decision variables. It provides the step-by-step procedure which involves plotting the constraints on a graph to identify the feasible region, determining the corner points of this region which represent the feasible solutions, substituting these points into the objective function to find the optimal value, and identifying the optimal solution. It then provides examples demonstrating this process and different types of solutions that can arise such as unbounded, infeasible, and optimal.
This document provides summaries of common special functions and polynomials, including Legendre polynomials, associated Legendre functions, Bessel functions, spherical Bessel functions, Hermite polynomials, and Laguerre polynomials. It defines the differential equations that govern each function, provides generating functions, discusses orthogonality properties, and lists some important recurrence relations and examples. The document is intended as a short survey of essential properties of these important mathematical functions.
The document provides instructions on how to take derivatives of functions when there are surds, fractional powers, or multiple terms. It demonstrates cunningly changing the subject of the formula to put powers or surds on top before taking the derivative. Examples are provided such as finding the derivative of y=√x by changing it to y=x1/2 and then taking the derivative. Strategies are also shown for breaking down derivatives of terms combined with addition or multiplication such as y=x4+2x2+4.
Operation research - the revised simplex method2013901097
This document provides examples of using the revised simplex method to solve linear programming problems. Example 1 walks through applying the method step-by-step to a multi-variable problem. It shows setting up the initial tableau, finding the entering and leaving variables, and updating the basis matrix at each iteration until an optimal solution is reached. Example 2 solves a problem with artificial variables using the two-phase method. It demonstrates writing the problem in standard and canonical form, and iteratively choosing entering/leaving variables and updating the basis matrix over two iterations to find the optimal solution.
This document discusses linear programming iterative methods. It introduces the simplex method, two-phase simplex method, and Big M method. An example problem is provided to illustrate solving a linear programming problem using these iterative methods. The problem involves maximizing profit from producing tables and chairs given resource constraints. The problem is formulated and solved using the simplex method in multiple steps.
The document discusses integration, which is the reverse process of differentiation. It provides formulas for integrating polynomial expressions like xn and axn and explains how to find the constant of integration C. Examples are given for integrating expressions and finding the area under a curve by integrating between limits of integration.
The document discusses lower bounds for sorting algorithms. It shows that the worst case and average case lower bounds for sorting are both Ω(n log n). This lower bound is derived by analyzing the minimum depth of balanced binary decision trees required to represent the n! possible permutations of n elements. Several algorithms, including heapsort, are shown to achieve the optimal time complexity of O(n log n), matching this lower bound. Problem transformations are also introduced as a method for proving lower bounds.
the two phase method - operations research2013901097
The two phase simplex method is used to solve linear programming problems. Phase I creates an artificial objective function to find a basic feasible solution. If the minimum is zero, a basic feasible solution exists and phase II begins. Phase II uses the original objective function and tableau from phase I to find an optimal solution. The example problem is solved using this two phase method, with phase I minimizing artificial variables to find a basic feasible solution, then phase II optimizing the original objective function.
This document provides examples of constructing the dual problem of a linear programming primal problem and solving it using the two-phase simplex method. It first presents the rules for constructing the dual problem and then works through two examples. The first example derives the dual problem from the primal and solves it using the two-phase method. The second example shows how to find the optimal dual solution given the optimal primal solution using two methods - using the objective coefficients of the primal variables or using the inverse of the primal basic variable matrix.
This document provides an overview of optimization techniques used in economics. It introduces maximizing a function of one variable, such as profit for a firm. The key concepts covered are:
- Derivatives and partial derivatives allow finding the optimal value of a variable that maximizes an objective function.
- The first order condition requires the derivative at the optimal point to be zero. Second order conditions ensure this is a maximum.
- Functions of multiple variables use partial derivatives to optimize while holding other variables constant.
- Elasticities measure the proportional response of one variable to changes in another. They are important in economic models.
The document describes an optimization problem where a company manufactures 3 products (A, B, C) using precious metals as inputs. The company aims to maximize total profit given daily allotments of platinum and gold.
The problem is formulated as a linear programming problem to determine the optimal production quantity of each product that maximizes profit. The simplex method is applied to solve the LPP and determine the maximum profit of Rs. 32,800 can be achieved by producing 8 units of product A and 24 units of product C.
This document summarizes the two phase simplex method for solving linear programming problems. In phase I, artificial variables are introduced to convert infeasible problems into feasible problems. The objective is to minimize the artificial variables. If the minimum is zero, the original problem is feasible and phase II begins. Phase II uses the original objective function and simplex method to find an optimal solution. An example problem is provided to illustrate the two phase method.
The document describes the two phase method for solving linear programming problems. In phase I, artificial variables are introduced to obtain an initial basic feasible solution. The objective is to minimize the artificial variables subject to the original constraints. In phase II, the original objective function is optimized using the feasible solution from phase I as the starting point, without the artificial variables. Two examples are provided to illustrate the two phase method.
This document provides an overview of the key topics covered in Lecture 4, including:
1. How to sketch quadratic and cubic curves by finding intercepts and stationary points.
2. How to use the second derivative to determine if a stationary point is a maximum, minimum, or point of inflection.
3. Rules for simplifying expressions using indices and how to convert numbers to and from standard form.
Disk-based data structures are needed to store large datasets that exceed main memory capacity. Hard disks allow large storage but have slow random access. B-trees address this by storing data in pages that can be read sequentially, keeping the tree shallow. Keys in B-tree nodes separate the ranges of keys in subtrees, and nodes have between t-1 and 2t-1 keys. Operations on B-trees like search, insert, and delete involve reading and writing nodes to disk and splitting or merging nodes as needed to maintain the B-tree properties.
The Big-M method is a variation of the simplex method for solving linear programming problems with "greater-than" constraints. It works by introducing artificial variables with a large coefficient M to transform inequality constraints into equality constraints, creating an initial feasible solution. The transformed problem is then solved via simplex elimination to arrive at an optimal solution while eliminating artificial variables. The document provides an example problem demonstrating the step-by-step Big-M method process of setting up and solving a linear program with inequalities.
This document provides an overview of the topics covered in Lecture 3 of a Calculus I course, including:
- Evaluating functions and using trial and improvement to find solutions to equations
- Differentiating polynomial expressions and finding the gradient of a curve at a given point
- Key terms like function, polynomial, curve, tangent, and derivative
- Examples of using trial and improvement to find solutions between values and determining points where the gradient of a curve is zero
The document provides an overview of the simplex method for solving linear programming problems with more than two decision variables. It describes key concepts like slack variables, surplus variables, basic feasible solutions, degenerate and non-degenerate solutions, and using tableau steps to arrive at an optimal solution. Examples are provided to illustrate setting up and solving problems using the simplex method.
This document provides an overview of linear programming. It discusses basic and basic feasible solutions, the geometric solution, definitions used in linear programming, and the simplex algorithm. It provides an example problem that is solved over multiple iterations using the simplex algorithm to find the optimal solution. Finally, it briefly discusses the primal dual relationship between linear programming problems.
The document describes the two phase simplex method for solving linear programming problems (LPP) with greater than or equal to constraints. In phase I, an auxiliary LPP is constructed by introducing artificial variables and slack/surplus variables. The objective is to minimize the artificial variables using the simplex method. If an artificial variable is positive or zero in the optimal basis, phase II is executed to solve the original LPP. Phase I provides a starting feasible solution for phase II to obtain the actual optimal solution.
1) The document discusses differentiation techniques such as differentiating polynomials, composite functions, and logarithmic and exponential functions.
2) It also covers applications of differentiation like finding maxima and minima, rates of change, and using differentiation to approximate small changes.
3) The key concepts covered are the derivative, differentiation rules, the relationship between the derivative and tangents/normals to curves, and using the derivative to solve optimization problems.
This document contains solutions to multiple questions regarding signals and systems. Question 1 discusses periodic signals with different periods and derives a new combined periodic signal. Question 2 involves differential equations and solutions. Question 3 covers energy signals, Kirchhoff's voltage law, and solving a differential equation for the current in an RLC circuit. Question 4 finds the zero-input and zero-state responses of a linear system. Question 5 provides solutions involving Fourier series representations of periodic functions.
The document discusses different number systems including binary, octal, decimal, and hexadecimal. It provides examples of converting between these number systems. Specifically, it explains how to convert a decimal number to its binary, octal, or hexadecimal equivalent by repeatedly dividing the number by the base or writing the remainder. Arithmetic operations like addition, subtraction, and multiplication are also covered for the binary system.
INTRODUCTION TO SORTING AND DETAIL EXPLANATION OF BUBBLE SORT
VIDEO TUTORIAL:
https://youtu.be/d8ruhxH5LLU
PDF TUTORIAL:
https://computerassignmentsforu.blogspot.com/p/classxiilist5.html
This document discusses divide-and-conquer algorithms and their time complexities. It begins with examples of finding the maximum of a set and binary search. It then presents the general steps of a divide-and-conquer algorithm and analyzes time complexity. Several algorithms are discussed including quicksort, merge sort, 2D maxima finding, closest pair problem, convex hull problem, and matrix multiplication. Strategies like divide, conquer, and merge are used to solve problems recursively in fewer comparisons than brute force methods. Many algorithms have a time complexity of O(n log n).
The document discusses lower bounds for sorting algorithms. It shows that the worst case and average case lower bounds for sorting are both Ω(n log n). This lower bound is derived by analyzing the minimum depth of balanced binary decision trees required to represent the n! possible permutations of n elements. Several algorithms, including heapsort, are shown to achieve the optimal time complexity of O(n log n), matching this lower bound. Problem transformations are also introduced as a method for proving lower bounds.
the two phase method - operations research2013901097
The two phase simplex method is used to solve linear programming problems. Phase I creates an artificial objective function to find a basic feasible solution. If the minimum is zero, a basic feasible solution exists and phase II begins. Phase II uses the original objective function and tableau from phase I to find an optimal solution. The example problem is solved using this two phase method, with phase I minimizing artificial variables to find a basic feasible solution, then phase II optimizing the original objective function.
This document provides examples of constructing the dual problem of a linear programming primal problem and solving it using the two-phase simplex method. It first presents the rules for constructing the dual problem and then works through two examples. The first example derives the dual problem from the primal and solves it using the two-phase method. The second example shows how to find the optimal dual solution given the optimal primal solution using two methods - using the objective coefficients of the primal variables or using the inverse of the primal basic variable matrix.
This document provides an overview of optimization techniques used in economics. It introduces maximizing a function of one variable, such as profit for a firm. The key concepts covered are:
- Derivatives and partial derivatives allow finding the optimal value of a variable that maximizes an objective function.
- The first order condition requires the derivative at the optimal point to be zero. Second order conditions ensure this is a maximum.
- Functions of multiple variables use partial derivatives to optimize while holding other variables constant.
- Elasticities measure the proportional response of one variable to changes in another. They are important in economic models.
The document describes an optimization problem where a company manufactures 3 products (A, B, C) using precious metals as inputs. The company aims to maximize total profit given daily allotments of platinum and gold.
The problem is formulated as a linear programming problem to determine the optimal production quantity of each product that maximizes profit. The simplex method is applied to solve the LPP and determine the maximum profit of Rs. 32,800 can be achieved by producing 8 units of product A and 24 units of product C.
This document summarizes the two phase simplex method for solving linear programming problems. In phase I, artificial variables are introduced to convert infeasible problems into feasible problems. The objective is to minimize the artificial variables. If the minimum is zero, the original problem is feasible and phase II begins. Phase II uses the original objective function and simplex method to find an optimal solution. An example problem is provided to illustrate the two phase method.
The document describes the two phase method for solving linear programming problems. In phase I, artificial variables are introduced to obtain an initial basic feasible solution. The objective is to minimize the artificial variables subject to the original constraints. In phase II, the original objective function is optimized using the feasible solution from phase I as the starting point, without the artificial variables. Two examples are provided to illustrate the two phase method.
This document provides an overview of the key topics covered in Lecture 4, including:
1. How to sketch quadratic and cubic curves by finding intercepts and stationary points.
2. How to use the second derivative to determine if a stationary point is a maximum, minimum, or point of inflection.
3. Rules for simplifying expressions using indices and how to convert numbers to and from standard form.
Disk-based data structures are needed to store large datasets that exceed main memory capacity. Hard disks allow large storage but have slow random access. B-trees address this by storing data in pages that can be read sequentially, keeping the tree shallow. Keys in B-tree nodes separate the ranges of keys in subtrees, and nodes have between t-1 and 2t-1 keys. Operations on B-trees like search, insert, and delete involve reading and writing nodes to disk and splitting or merging nodes as needed to maintain the B-tree properties.
The Big-M method is a variation of the simplex method for solving linear programming problems with "greater-than" constraints. It works by introducing artificial variables with a large coefficient M to transform inequality constraints into equality constraints, creating an initial feasible solution. The transformed problem is then solved via simplex elimination to arrive at an optimal solution while eliminating artificial variables. The document provides an example problem demonstrating the step-by-step Big-M method process of setting up and solving a linear program with inequalities.
This document provides an overview of the topics covered in Lecture 3 of a Calculus I course, including:
- Evaluating functions and using trial and improvement to find solutions to equations
- Differentiating polynomial expressions and finding the gradient of a curve at a given point
- Key terms like function, polynomial, curve, tangent, and derivative
- Examples of using trial and improvement to find solutions between values and determining points where the gradient of a curve is zero
The document provides an overview of the simplex method for solving linear programming problems with more than two decision variables. It describes key concepts like slack variables, surplus variables, basic feasible solutions, degenerate and non-degenerate solutions, and using tableau steps to arrive at an optimal solution. Examples are provided to illustrate setting up and solving problems using the simplex method.
This document provides an overview of linear programming. It discusses basic and basic feasible solutions, the geometric solution, definitions used in linear programming, and the simplex algorithm. It provides an example problem that is solved over multiple iterations using the simplex algorithm to find the optimal solution. Finally, it briefly discusses the primal dual relationship between linear programming problems.
The document describes the two phase simplex method for solving linear programming problems (LPP) with greater than or equal to constraints. In phase I, an auxiliary LPP is constructed by introducing artificial variables and slack/surplus variables. The objective is to minimize the artificial variables using the simplex method. If an artificial variable is positive or zero in the optimal basis, phase II is executed to solve the original LPP. Phase I provides a starting feasible solution for phase II to obtain the actual optimal solution.
1) The document discusses differentiation techniques such as differentiating polynomials, composite functions, and logarithmic and exponential functions.
2) It also covers applications of differentiation like finding maxima and minima, rates of change, and using differentiation to approximate small changes.
3) The key concepts covered are the derivative, differentiation rules, the relationship between the derivative and tangents/normals to curves, and using the derivative to solve optimization problems.
This document contains solutions to multiple questions regarding signals and systems. Question 1 discusses periodic signals with different periods and derives a new combined periodic signal. Question 2 involves differential equations and solutions. Question 3 covers energy signals, Kirchhoff's voltage law, and solving a differential equation for the current in an RLC circuit. Question 4 finds the zero-input and zero-state responses of a linear system. Question 5 provides solutions involving Fourier series representations of periodic functions.
The document discusses different number systems including binary, octal, decimal, and hexadecimal. It provides examples of converting between these number systems. Specifically, it explains how to convert a decimal number to its binary, octal, or hexadecimal equivalent by repeatedly dividing the number by the base or writing the remainder. Arithmetic operations like addition, subtraction, and multiplication are also covered for the binary system.
INTRODUCTION TO SORTING AND DETAIL EXPLANATION OF BUBBLE SORT
VIDEO TUTORIAL:
https://youtu.be/d8ruhxH5LLU
PDF TUTORIAL:
https://computerassignmentsforu.blogspot.com/p/classxiilist5.html
This document discusses divide-and-conquer algorithms and their time complexities. It begins with examples of finding the maximum of a set and binary search. It then presents the general steps of a divide-and-conquer algorithm and analyzes time complexity. Several algorithms are discussed including quicksort, merge sort, 2D maxima finding, closest pair problem, convex hull problem, and matrix multiplication. Strategies like divide, conquer, and merge are used to solve problems recursively in fewer comparisons than brute force methods. Many algorithms have a time complexity of O(n log n).
This document discusses divide-and-conquer algorithms and their time complexities. It begins with examples of finding the maximum of a set and binary search. It then presents the general steps of a divide-and-conquer algorithm and analyzes time complexity. Several algorithms are discussed including quicksort, merge sort, 2D maxima finding, closest pair problem, convex hull problem, and matrix multiplication. Strategies like divide, conquer, and merge are used to solve problems recursively in fewer comparisons than brute force methods. Many algorithms have a time complexity of O(n log n).
This document discusses randomized algorithms. It begins by listing different categories of algorithms, including randomized algorithms. Randomized algorithms introduce randomness into the algorithm to avoid worst-case behavior and find efficient approximate solutions. Quicksort is presented as an example randomized algorithm, where randomness improves its average runtime from quadratic to linear. The document also discusses the randomized closest pair algorithm and a randomized algorithm for primality testing. Both introduce randomness to improve efficiency compared to deterministic algorithms for the same problems.
The instructor's manual provides solutions to problems from Chapter 1 of the textbook "Introduction to Matlab 6 for Engineers". The solutions include MATLAB code sessions that demonstrate how to solve various problems involving matrices, polynomials, plotting functions, and solving systems of equations. Figures generated by some of the MATLAB plots are also included.
This document provides information on procedures, sub procedures, function procedures, and calling procedures by value and by reference in Visual Basic. It includes examples of defining and calling sub procedures and functions, including passing arguments and returning values. It also covers optional arguments, mathematical functions, string functions, recursion, code modules, and accessing procedures defined in modules from forms.
The document discusses a blog that provides free solutions manuals and solved exercises for many university textbooks. It states that the solutions manuals contain clear explanations of all the exercises from the textbooks. It invites the reader to visit the blog to download the solutions manuals for free.
The document contains 8 solved problems related to linear programming and network flows:
1. Uses the simplex method to solve a linear programming problem to maximize an objective function subject to constraints.
2. Again uses the simplex method to solve another linear programming problem with an objective function and constraints.
3. Solves a transportation problem through iterative steps to find the maximum flow between sources and targets.
4. Finds the maximum flow in a network using multiple paths and iterations.
5. Finds the maximum matching in a bipartite graph through unique pairings.
6. Finds the maximum matching for another matching problem instance.
7. Finds a good matching for a marriage problem by considering men's and women's
This document contains 27 solved math problems involving vectors and matrices. The problems demonstrate various vector and matrix operations like addition, subtraction, multiplication, and dot products. They also show how to plot functions and find maximum values. The problems are solved using MATLAB code and the results are displayed in the command window.
Recursion occurs when a thing is defined in terms of itself or of its type. Recursion is used in a variety of disciplines ranging from linguistics to logic. The most common application of recursion is in mathematics and computer science, where a function being defined is applied within its own definition. While this apparently defines an infinite number of instances (function values), it is often done in such a way that no loop or infinite chain of references can occur.
The document describes various divide and conquer algorithms including binary search, merge sort, quicksort, and finding maximum and minimum elements. It begins by explaining the general divide and conquer approach of dividing a problem into smaller subproblems, solving the subproblems independently, and combining the solutions. Several examples are then provided with pseudocode and analysis of their divide and conquer implementations. Key algorithms covered in the document include binary search (log n time), merge sort (n log n time), and quicksort (n log n time on average).
The document discusses various sorting and searching algorithms. It begins by introducing selection sort, insertion sort, and bubble sort. It then covers merge sort and explains how it works by dividing the list, sorting sublists recursively, and merging the results. Finally, it discusses linear/sequential search and binary search, noting that sequential search checks every element while binary search repeatedly halves the search space.
Soft heaps are a data structure that provide faster operations than regular heaps while allowing some errors. Soft heaps have an error parameter ε such that after n inserts, at most εn elements may be corrupted. This allows operations like delete-min to run in O(1) amortized time and insert to run in O(log(1/ε)) amortized time. Soft heaps work by grouping corrupted elements together using a linked list of heap-ordered binary trees with suffix-min pointers.
Solutions manual for fundamentals of business math canadian 3rd edition by je...Pollockker
This document provides the solutions manual for the 3rd Canadian edition of the textbook "Fundamentals of Business Math" by Jerome. It contains solutions to exercises in Chapter 2 on reviewing and applying algebra. The exercises cover basic, intermediate, and advanced algebra problems involving operations with variables, exponents, percentages, and compound interest.
The document provides an introduction to MATLAB, describing the main environment components like the command window and workspace. It explains basic MATLAB functions and variables, arrays, control flow statements, M-files, and common plotting and data analysis tools. Examples are given of different array operations, control structures, and building simple MATLAB functions and scripts.
The document discusses various sorting algorithms including insertion sort, selection sort, bubble sort, merge sort, and quick sort. It provides detailed explanations of how each algorithm works through examples using arrays or lists of numbers. The key steps of each algorithm are outlined in pseudocode to demonstrate how they sort a set of data in either ascending or descending order.
Cosmetics Shop Management System is a complete solution for managing a Shop, in other words, an enhanced tool that assists in organizing the day-to-day activities of a Shop. There is the need of an application for efficient management and handling customer orders. This Cosmetics Shop Management System keeps every record Shop and reducing paperwork
This document contains source code for a computer shop management system project. It includes functions for adding, modifying, deleting, and searching computer product records in a database. It also contains functions for generating sales invoices and reports. The main menu allows selecting between product management, sales/purchases, and reports generation. Overall, the source code provides a way to manage the entire operations of a computer shop using a database to store product and sales information.
Development of an interactive car sale system which lets a user to find a car and its details is the main objective of this project. The administrators can access, enter, modify and delete the details of every car. Administrators are responsible of maintaining the details of vehicles like the Manufacturer information,
This document contains the source code for a book shop management system project. It includes functions for adding, modifying, deleting book records from the database, and searching books by various criteria. It also includes functions for generating reports on book sales and purchases and printing invoices. The source code uses Python and connects to a MySQL database to manage the book data.
1) The document discusses various Python flow control statements including if, if-else, nested if-else, and elif statements with examples of using these to check conditions and execute code blocks accordingly.
2) Examples include programs to check number comparisons, even/odd numbers, positive/negative numbers, and using nested if-else for multi-level checks like checking triangle validity.
3) The last few sections discuss using if-else statements to classify triangles as equilateral, isosceles, or scalene and to check if a number is positive, negative, or zero.
The document discusses Python's if-else conditional statements. It provides examples of using if-else to check 1) if a user's age is greater than or equal to 18, 2) if a number is positive or negative, 3) if a number is even or odd, 4) if a number is divisible by 3 or 7, and 5) if a year is a leap year. The last example shows how to find the maximum between two numbers using if-else. The syntax and logic of if-else statements are explained through these examples.
This document discusses different types of flow control in Python programs. It explains that a program's control flow defines the order of execution and can be altered using control flow statements. There are three main types of control flow: sequential, conditional/selection, and iterative/looping.
Sequential flow executes code lines in order. Conditional/selection statements like if/else allow decisions based on conditions. Iterative/looping statements like for and while loops repeat code for a set number of iterations or as long as a condition is true. Specific conditional statements, loops, and examples are described in more detail.
This document discusses different types of operators in Python including arithmetic, comparison, assignment, logical, membership, and identity operators. It provides examples of using arithmetic operators like addition, subtraction, multiplication, division, floor division, exponentiation, and modulus on variables. It also covers operator precedence and use of operators with strings.
The document discusses various operators in Python including assignment, comparison, logical, identity, and membership operators. It provides examples of how each operator works and the output. Specifically, it explains that assignment operators are used to assign values to variables using shortcuts like +=, -=, etc. Comparison operators compare values and return True or False. Logical operators combine conditional statements using and, or, and not. Identity operators compare the memory location of objects using is and is not. Membership operators test if a value is present in a sequence using in and not in.
The print() function in Python allows users to customize output. The sep and end parameters can be used to control the separator between values and the ending text. Sep allows specifying the character or string inserted between values, like a comma, while end controls the string appended after the last value, like a new line. Examples demonstrate using sep and end to print values on separate lines, with different separators like commas and tabs, or append text to the end of a print statement.
This document discusses data types and variables in Python. It explains that a variable is a name that refers to a memory location used to store values. The main data types in Python are numbers, strings, lists, tuples, and dictionaries. It provides examples of declaring and initializing different types of variables, including integers, floats, characters, and strings. Methods for assigning values, displaying values, and accepting user input are also demonstrated. The document also discusses type conversion using functions like int(), float(), and eval() when accepting user input.
The document discusses user-defined functions in Python. It provides examples of different types of functions: default functions without parameters, parameterized functions that accept arguments, and functions that return values. It demonstrates how to define functions using the def keyword and call functions. The examples show functions to print messages, calculate mathematical operations based on user input, check if a number is even or odd, and display sequences of numbers in different patterns using loops. Finally, it provides an example of a program that uses multiple functions and user input to perform mathematical operations.
This document discusses random functions in Python. It explains how to import the random module and describes several functions:
- random() generates random float numbers between 0 and 1
- randrange() returns random integers within a given range
- randint() returns random integers within a range similar to randrange()
Examples are provided to demonstrate how to use these functions to generate random numbers between certain values or in lists.
Functions allow programmers to organize code into reusable blocks to perform related actions. There are three types of functions: built-in functions, modules, and user-defined functions. Built-in functions like int(), float(), str(), and abs() are predefined to perform common tasks. Modules like the math module provide additional mathematical functions like ceil(), floor(), pow(), sqrt(), and trigonometric functions. User-defined functions are created by programmers to customize functionality.
NATURAL ENVIRONMENT,CATEGORIES OF RESOURCES,NATURAL RESOURCES,RENEWABLE AND NON-RENEWABLE,EXHAUSTIBLE , NON-EXHAUSTIBLE RESOURCES,HOW ENVIRONMENT IS CRUCIAL FOR US
WHAT IS DICTIONARY IN PYTHON?
HOW TO CREATE A DICTIONARY
INITIALIZE THE DICTIONARY
ACCESSING KEYS AND VALUES FROM A DICTIONARY
LOOPS TO DISPLAY KEYS AND VALUES IN A DICTIONARY
METHODS IN A DICTIONARY
TO WATCH VIDEO OR PDF:
https://computerassignmentsforu.blogspot.com/p/dictinpyxii.html
Walmart Business+ and Spark Good for Nonprofits.pdfTechSoup
"Learn about all the ways Walmart supports nonprofit organizations.
You will hear from Liz Willett, the Head of Nonprofits, and hear about what Walmart is doing to help nonprofits, including Walmart Business and Spark Good. Walmart Business+ is a new offer for nonprofits that offers discounts and also streamlines nonprofits order and expense tracking, saving time and money.
The webinar may also give some examples on how nonprofits can best leverage Walmart Business+.
The event will cover the following::
Walmart Business + (https://business.walmart.com/plus) is a new shopping experience for nonprofits, schools, and local business customers that connects an exclusive online shopping experience to stores. Benefits include free delivery and shipping, a 'Spend Analytics” feature, special discounts, deals and tax-exempt shopping.
Special TechSoup offer for a free 180 days membership, and up to $150 in discounts on eligible orders.
Spark Good (walmart.com/sparkgood) is a charitable platform that enables nonprofits to receive donations directly from customers and associates.
Answers about how you can do more with Walmart!"
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumMJDuyan
(𝐓𝐋𝐄 𝟏𝟎𝟎) (𝐋𝐞𝐬𝐬𝐨𝐧 𝟏)-𝐏𝐫𝐞𝐥𝐢𝐦𝐬
𝐃𝐢𝐬𝐜𝐮𝐬𝐬 𝐭𝐡𝐞 𝐄𝐏𝐏 𝐂𝐮𝐫𝐫𝐢𝐜𝐮𝐥𝐮𝐦 𝐢𝐧 𝐭𝐡𝐞 𝐏𝐡𝐢𝐥𝐢𝐩𝐩𝐢𝐧𝐞𝐬:
- Understand the goals and objectives of the Edukasyong Pantahanan at Pangkabuhayan (EPP) curriculum, recognizing its importance in fostering practical life skills and values among students. Students will also be able to identify the key components and subjects covered, such as agriculture, home economics, industrial arts, and information and communication technology.
𝐄𝐱𝐩𝐥𝐚𝐢𝐧 𝐭𝐡𝐞 𝐍𝐚𝐭𝐮𝐫𝐞 𝐚𝐧𝐝 𝐒𝐜𝐨𝐩𝐞 𝐨𝐟 𝐚𝐧 𝐄𝐧𝐭𝐫𝐞𝐩𝐫𝐞𝐧𝐞𝐮𝐫:
-Define entrepreneurship, distinguishing it from general business activities by emphasizing its focus on innovation, risk-taking, and value creation. Students will describe the characteristics and traits of successful entrepreneurs, including their roles and responsibilities, and discuss the broader economic and social impacts of entrepreneurial activities on both local and global scales.
The chapter Lifelines of National Economy in Class 10 Geography focuses on the various modes of transportation and communication that play a vital role in the economic development of a country. These lifelines are crucial for the movement of goods, services, and people, thereby connecting different regions and promoting economic activities.
Chapter wise All Notes of First year Basic Civil Engineering.pptxDenish Jangid
Chapter wise All Notes of First year Basic Civil Engineering
Syllabus
Chapter-1
Introduction to objective, scope and outcome the subject
Chapter 2
Introduction: Scope and Specialization of Civil Engineering, Role of civil Engineer in Society, Impact of infrastructural development on economy of country.
Chapter 3
Surveying: Object Principles & Types of Surveying; Site Plans, Plans & Maps; Scales & Unit of different Measurements.
Linear Measurements: Instruments used. Linear Measurement by Tape, Ranging out Survey Lines and overcoming Obstructions; Measurements on sloping ground; Tape corrections, conventional symbols. Angular Measurements: Instruments used; Introduction to Compass Surveying, Bearings and Longitude & Latitude of a Line, Introduction to total station.
Levelling: Instrument used Object of levelling, Methods of levelling in brief, and Contour maps.
Chapter 4
Buildings: Selection of site for Buildings, Layout of Building Plan, Types of buildings, Plinth area, carpet area, floor space index, Introduction to building byelaws, concept of sun light & ventilation. Components of Buildings & their functions, Basic concept of R.C.C., Introduction to types of foundation
Chapter 5
Transportation: Introduction to Transportation Engineering; Traffic and Road Safety: Types and Characteristics of Various Modes of Transportation; Various Road Traffic Signs, Causes of Accidents and Road Safety Measures.
Chapter 6
Environmental Engineering: Environmental Pollution, Environmental Acts and Regulations, Functional Concepts of Ecology, Basics of Species, Biodiversity, Ecosystem, Hydrological Cycle; Chemical Cycles: Carbon, Nitrogen & Phosphorus; Energy Flow in Ecosystems.
Water Pollution: Water Quality standards, Introduction to Treatment & Disposal of Waste Water. Reuse and Saving of Water, Rain Water Harvesting. Solid Waste Management: Classification of Solid Waste, Collection, Transportation and Disposal of Solid. Recycling of Solid Waste: Energy Recovery, Sanitary Landfill, On-Site Sanitation. Air & Noise Pollution: Primary and Secondary air pollutants, Harmful effects of Air Pollution, Control of Air Pollution. . Noise Pollution Harmful Effects of noise pollution, control of noise pollution, Global warming & Climate Change, Ozone depletion, Greenhouse effect
Text Books:
1. Palancharmy, Basic Civil Engineering, McGraw Hill publishers.
2. Satheesh Gopi, Basic Civil Engineering, Pearson Publishers.
3. Ketki Rangwala Dalal, Essentials of Civil Engineering, Charotar Publishing House.
4. BCP, Surveying volume 1
This presentation was provided by Rebecca Benner, Ph.D., of the American Society of Anesthesiologists, for the second session of NISO's 2024 Training Series "DEIA in the Scholarly Landscape." Session Two: 'Expanding Pathways to Publishing Careers,' was held June 13, 2024.
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...PECB
Denis is a dynamic and results-driven Chief Information Officer (CIO) with a distinguished career spanning information systems analysis and technical project management. With a proven track record of spearheading the design and delivery of cutting-edge Information Management solutions, he has consistently elevated business operations, streamlined reporting functions, and maximized process efficiency.
Certified as an ISO/IEC 27001: Information Security Management Systems (ISMS) Lead Implementer, Data Protection Officer, and Cyber Risks Analyst, Denis brings a heightened focus on data security, privacy, and cyber resilience to every endeavor.
His expertise extends across a diverse spectrum of reporting, database, and web development applications, underpinned by an exceptional grasp of data storage and virtualization technologies. His proficiency in application testing, database administration, and data cleansing ensures seamless execution of complex projects.
What sets Denis apart is his comprehensive understanding of Business and Systems Analysis technologies, honed through involvement in all phases of the Software Development Lifecycle (SDLC). From meticulous requirements gathering to precise analysis, innovative design, rigorous development, thorough testing, and successful implementation, he has consistently delivered exceptional results.
Throughout his career, he has taken on multifaceted roles, from leading technical project management teams to owning solutions that drive operational excellence. His conscientious and proactive approach is unwavering, whether he is working independently or collaboratively within a team. His ability to connect with colleagues on a personal level underscores his commitment to fostering a harmonious and productive workplace environment.
Date: May 29, 2024
Tags: Information Security, ISO/IEC 27001, ISO/IEC 42001, Artificial Intelligence, GDPR
-------------------------------------------------------------------------------
Find out more about ISO training and certification services
Training: ISO/IEC 27001 Information Security Management System - EN | PECB
ISO/IEC 42001 Artificial Intelligence Management System - EN | PECB
General Data Protection Regulation (GDPR) - Training Courses - EN | PECB
Webinars: https://pecb.com/webinars
Article: https://pecb.com/article
-------------------------------------------------------------------------------
For more information about PECB:
Website: https://pecb.com/
LinkedIn: https://www.linkedin.com/company/pecb/
Facebook: https://www.facebook.com/PECBInternational/
Slideshare: http://www.slideshare.net/PECBCERTIFICATION
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.pptHenry Hollis
The History of NZ 1870-1900.
Making of a Nation.
From the NZ Wars to Liberals,
Richard Seddon, George Grey,
Social Laboratory, New Zealand,
Confiscations, Kotahitanga, Kingitanga, Parliament, Suffrage, Repudiation, Economic Change, Agriculture, Gold Mining, Timber, Flax, Sheep, Dairying,
2. WHAT IS SELECTION SORT?
The Selection sort is based on the idea of finding the minimum or maximum
element in an unsorted array and then putting it in its correct position in a sorted
LIST
How Selection Sort Works?
Step 1: Select the first element of the list and set the first element as minimum
Step 2: Compare minimum with the next element. If the next element is smaller than
minimum, assign the next element as minimum. This process goes on until the last
element.
Step 3: After each iteration, minimum is placed in the front of the unsorted list.
Step 4: Step 1 to 3 are repeated until all the elements are placed at their correct
positions.
3. How Selection Sort Works?
0 1 2 3 4
20 12 10 15 2
Let Us Understand With The Help Of Example:
no=
These are unsorted number and we need to sort them with the help of selection sort
20 12 10 15 2
Step 1: initialize the list with numbers as shown below:
no=[20,12,10,15,2]
4. Step 2: Declare variable K and store the
length of list.
no=[20,12,10,15,2]
K=len(no)
0 1 2 3 4
20 12 10 15 2
no=
K=5
Step 4: Start the outer loop x from 0 to K-1
for x in range(0,K):
x=0 k
Step 5: Start the inner loop y from 0 to K-1
Step 5: before starting inner loop store minimum =x the index number
min=x
for y in range(x+1,k):
y=x+1=0+1=1
5. Step 2: Declare variable K and store the length of list.
no=[20,12,10,15,2]
K=len(no)
0 1 2 3 4
20 12 10 15 2
no=
K=5
Step 4: Start the outer loop x from 0 to K-1
for x in range(0,K):
x=0 k
Step 5: Start the inner loop y from 0 to K-1
Step 5: before starting inner loop store minimum =x the index number
min=x
for y in range(0+1,k):
Step 6: Start if condition inside inner loop to check no[min] value is greater than no[y] or
not.
if no[min]> no[y]:
Step 7: if condition TRUE than overwrite the minimum value with y
min=y
6. Step 2: Declare variable K and store the length of list.
no=[20,12,10,15,2]
K=len(no)
0 1 2 3 4
20 12 10 15 2
no=
K=5
Step 4: Start the outer loop x from 0 to K-1
for x in range(0,K):
x=0 k
Step 5: Start the inner loop y from 0 to K-1
Step 5: before starting inner loop store minimum =x the index number
min=x
for y in range(0+1,k):
Step 6: Start if condition inside inner loop to check no[min] value is greater than no[y] or not.
if no[min]> no[y]:
Step 7: if condition TRUE than overwrite the minimum value with y
min=y
Step 8:Every time when inner loop finished swapping starts before outer loop move to next step
tmp=no[min]
no[min]=no[x]
no[x]=tmp
7. Step 2: Declare variable K and store the length of list.
no=[20,12,10,15,2]
K=len(no) 0 1 2 3 4
20 12 10 15 2
no=
K=5
Step 4: Start the outer loop x from 0 to K-1
for x in range(0,K):
x=0 k
Step 5: Start the inner loop y from 0 to K-1
Step 5: before starting inner loop store minimum =x the index number
min=x
for y in range(0+1,k):
Step 6: Start if condition inside inner loop to check no[min] value is greater than no[y] or not.
if no[min]> no[y]:
Step 7: if condition TRUE than overwrite the minimum value with y
min=y
Step 8:Every time when inner loop finished swapping starts before outer loop move to next step
tmp=no[min]
no[min]=no[x]
no[x]=tmp
Step 9: Display the final result
print(no)
8. no=[10,19,5,4,12,3]
K=len(no)
for x in range(0,K):
min = x
for y in range(x + 1, K):
if no[min]> no[y]:
min = y
temp= no[min];
no[min] = no[x]
no[x]=temp
print("Pass: ",x+1,"=",no)
print("Final List:",no)
SELECTION SORT FULL CODE:
Inner loop
Outer loop
Outer loop
9. 10 19 5 4 12 3
PASS 1 started x=0
Unsorted Value
Y=x+1=1 K
X=0
Inner loop
Outer loop
min=0
10. SELECTION SORT:
no=[10,19,5,4,12,3]
K=len(no)
for x in range(0,K):
min = x
for y in range(x + 1, K):
if no[min]> no[y]:
min = y
temp= no[min];
no[min] = no[x]
no[x]=temp
print("Pass: ",x+1,"=",no)
print("Final List:",no)
10 19 5 4 12 3no=
0 1 2 3 4 5
x=0 min=x
K
Outer loop [this is pass 1]
Inner loop start where y starts from x+1 to K
y=1 10 19 5 4 12 3 min=0x=0
y=1
K=6(less than 6)
if 10>19 FALSE min value remain same
min=0
11. SELECTION SORT:
no=[10,19,5,4,12,3]
K=len(no)
for x in range(0,K):
min = x
for y in range(x + 1, K):
if no[min]> no[y]:
min = y
temp= no[min];
no[min] = no[x]
no[x]=temp
print("Pass: ",x+1,"=",no)
print("Final List:",no)
10 19 5 4 12 3no=
0 1 2 3 4 5
x=0 min=x
K
Outer loop [this is pass 1]
y=1
y=2
10 19 5 4 12 3
min=0x=0
y=2
K=6(less than 6)
if 10>5 TRUE min value change to 2
min=0
10 19 5 4 12 3
12. SELECTION SORT:
no=[10,19,5,4,12,3]
K=len(no)
for x in range(0,K):
min = x
for y in range(x + 1, K):
if no[min]> no[y]:
min = y
temp= no[min];
no[min] = no[x]
no[x]=temp
print("Pass: ",x+1,"=",no)
print("Final List:",no)
10 19 5 4 12 3no=
0 1 2 3 4 5
x=0 min=x
K
Outer loop [this is pass 1]
y=1
y=2
y=3
10 19 5 4 12 3
min=2x=0
K=6(less than 6)
if 5>4 TRUE min value change to 3
10 19 5 4 12 3
y=3min=2
10 19 5 4 12 3
13. SELECTION SORT:
no=[10,19,5,4,12,3]
K=len(no)
for x in range(0,K):
min = x
for y in range(x + 1, K):
if no[min]> no[y]:
min = y
temp= no[min];
no[min] = no[x]
no[x]=temp
print("Pass: ",x+1,"=",no)
print("Final List:",no)
10 19 5 4 12 3no=
0 1 2 3 4 5
x=0 min=x
K
Outer loop [this is pass 1]
y=1
y=2
y=3
y=4
10 19 5 4 12 3
min=3x=0
K=6(less than 6)
if 4>12 FALSE min value remain 3
10 19 5 4 12 3
y=4min=3
10 19 5 4 12 3
10 19 5 4 12 3
14. SELECTION SORT:
no=[10,19,5,4,12,3]
K=len(no)
for x in range(0,K):
min = x
for y in range(x + 1, K):
if no[min]> no[y]:
min = y
temp= no[min];
no[min] = no[x]
no[x]=temp
print("Pass: ",x+1,"=",no)
print("Final List:",no)
10 19 5 4 12 3no=
0 1 2 3 4 5
x=0 min=x
K
Outer loop [this is pass 1]
y=1
y=2
y=3
y=4
y=5
10 19 5 4 12 3
min=3x=0
K=6(less than 6)
if 4>3 TRUE min value change to 5
10 19 5 4 12 3
y=5min=3
10 19 5 4 12 3
10 19 5 4 12 3
10 19 5 4 12 3
15. SELECTION SORT:
no=[10,19,5,4,12,3]
K=len(no)
for x in range(0,K):
min = x
for y in range(x + 1, K):
if no[min]> no[y]:
min = y
temp= no[min];
no[min] = no[x]
no[x]=temp
print("Pass: ",x+1,"=",no)
print("Final List:",no)
10 19 5 4 12 3no=
0 1 2 3 4 5
x=0 min=x
K
Outer loop [this is pass 1]
y=1
y=2
y=3
y=4
y=5
10 19 5 4 12 3
min=5x=0
Now Swapping start
tmp= 3 temp=no[min]
10 19 5 4 12 3
min=5
10 19 5 4 12 3
10 19 5 4 12 3
10 19 5 4 12 3
x=0
swap
Inner loop finish
no[min]=no[x]no[5]= 10
no[0]= 3 no[x]=temp1019 5 4 123
Pass 1 Final value:
16. 1019 5 4 123
PASS 1 FINAL VALUE:
Sorted Value
Unsorted Value
17. 1019 5 4 123
PASS 2 STARTS Where X=1
Sorted Value
Y=x+1=1+1=2 K
X=1
Inner loop
Outer loop
min=1
18. SELECTION SORT:
no=[10,19,5,4,12,3]
K=len(no)
for x in range(0,K):
min = x
for y in range(x + 1, K):
if no[min]> no[y]:
min = y
temp= no[min];
no[min] = no[x]
no[x]=temp
print("Pass: ",x+1,"=",no)
print("Final List:",no)
3 19 5 4 12 10no=
0 1 2 3 4 5
x=1 min=x
K
Outer loop [this is pass 2]
Inner loop start where y starts from x+1 to K
y=2 3 19 5 4 12 10 min=1x=1
y=2
K=6(less than 6)
if 19>5 TRUE min value Change 2
min=1
19. SELECTION SORT:
no=[10,19,5,4,12,3]
K=len(no)
for x in range(0,K):
min = x
for y in range(x + 1, K):
if no[min]> no[y]:
min = y
temp= no[min];
no[min] = no[x]
no[x]=temp
print("Pass: ",x+1,"=",no)
print("Final List:",no)
3 19 5 4 12 10no=
0 1 2 3 4 5
x=0 min=x
K
Outer loop [this is pass 1]
y=2
y=3
3 19 5 4 12 10
min=2x=1
y=3
K=6(less than 6)
If 5>4 TRUE min value change to 3
min=2
3 19 5 4 12 10
20. SELECTION SORT:
no=[10,19,5,4,12,3]
K=len(no)
for x in range(0,K):
min = x
for y in range(x + 1, K):
if no[min]> no[y]:
min = y
temp= no[min];
no[min] = no[x]
no[x]=temp
print("Pass: ",x+1,"=",no)
print("Final List:",no)
3 19 5 4 12 10no=
0 1 2 3 4 5
x=0 min=x
K
Outer loop [this is pass 1]
y=2
y=3
y=4
3 19 5 4 12 10
min=3x=1
K=6(less than 6)
if 4>12 FALSE min value remain same
3 19 5 4 12 10
y=4min=3
3 19 5 4 12 10
21. SELECTION SORT:
no=[10,19,5,4,12,3]
K=len(no)
for x in range(0,K):
min = x
for y in range(x + 1, K):
if no[min]> no[y]:
min = y
temp= no[min];
no[min] = no[x]
no[x]=temp
print("Pass: ",x+1,"=",no)
print("Final List:",no)
3 19 5 4 12 10no=
0 1 2 3 4 5
x=0 min=x
K
Outer loop [this is pass 1]
y=2
y=3
y=4
y=5
3 19 5 4 12 10
min=3x=1
K=6(less than 6)
If 4>10 FALSE min value remain same
3 19 5 4 12 10
y=5min=3
3 19 5 4 12 10
3 19 5 4 12 10
22. SELECTION SORT:
no=[10,19,5,4,12,3]
K=len(no)
for x in range(0,K):
min = x
for y in range(x + 1, K):
if no[min]> no[y]:
min = y
temp= no[min];
no[min] = no[x]
no[x]=temp
print("Pass: ",x+1,"=",no)
print("Final List:",no)
3 19 5 4 12 10no=
0 1 2 3 4 5
x=0 min=x
K
Outer loop [this is pass 1]
y=2
y=3
y=4
y=5
3 19 5 4 12 10
min=3x=1
Now Swapping start
tmp= 4 temp=no[min]
3 19 5 4 12 10
min=3
3 19 5 4 12 10
3 19 5 4 12 10
x=1
swap
Inner loop finish
no[min]=no[x]no[3]= 19
no[1]= 4 no[x]=temp101954 123
Pass 2 Final value:
24. 101954 123
PASS 3 STARTS Where X=2
Sorted Value
Y=x+1=3 K
X=2
Inner loop
Outer loop
25. SELECTION SORT:
no=[10,19,5,4,12,3]
K=len(no)
for x in range(0,K):
min = x
for y in range(x + 1, K):
if no[min]> no[y]:
min = y
temp= no[min];
no[min] = no[x]
no[x]=temp
print("Pass: ",x+1,"=",no)
print("Final List:",no)
3 1954 12 10no=
0 1 2 3 4 5
x=2 min=x
K
Outer loop [this is pass 3]
Inner loop start where y starts from x+1 to K
y=3 3 1954 12 10 min=2x=2
y=3
K=6(less than 6)
If 5>19 FALSE min value remain same
min=2
26. SELECTION SORT:
no=[10,19,5,4,12,3]
K=len(no)
for x in range(0,K):
min = x
for y in range(x + 1, K):
if no[min]> no[y]:
min = y
temp= no[min];
no[min] = no[x]
no[x]=temp
print("Pass: ",x+1,"=",no)
print("Final List:",no)
3 1954 12 10no=
0 1 2 3 4 5
x=0 min=x
K
Outer loop [this is pass 3]
y=3
y=4
3 1954 12 10
min=2x=2
y=4
K=6(less than 6)
If 5>12 FALSE min value remain same
min=2
3 1954 12 10
27. SELECTION SORT:
no=[10,19,5,4,12,3]
K=len(no)
for x in range(0,K):
min = x
for y in range(x + 1, K):
if no[min]> no[y]:
min = y
temp= no[min];
no[min] = no[x]
no[x]=temp
print("Pass: ",x+1,"=",no)
print("Final List:",no)
3 1954 12 10no=
0 1 2 3 4 5
x=0 min=x
K
Outer loop [this is pass 3]
y=3
y=4
y=5
3 1954 12 10
min=2x=2
K=6(less than 6)
If 5>10 FALSE min value remain same
3 1954 12 10
y=5min=2
3 1954 12 10
28. SELECTION SORT:
no=[10,19,5,4,12,3]
K=len(no)
for x in range(0,K):
min = x
for y in range(x + 1, K):
if no[min]> no[y]:
min = y
temp= no[min];
no[min] = no[x]
no[x]=temp
print("Pass: ",x+1,"=",no)
print("Final List:",no)
3 1954 12 10no=
0 1 2 3 4 5
x=0 min=x
K
Outer loop [this is pass 3]
y=3
y=4
y=5
min=2x=2
Now Swapping start
tmp= 5 temp=no[min]
3 1954 12 10
min=2
3 1954 12 10
3 1954 12 10
x=2swap
Inner loop finish
no[min]=no[x]no[2]= 5
no[2]= 5 no[x]=temp101954 123
Pass 3 Final value:
30. 101954 123
PASS 4 STARTS Where X=3
Sorted Value
Y=x+1=4 K
X=3
Inner loop
Outer loop
31. SELECTION SORT:
no=[10,19,5,4,12,3]
K=len(no)
for x in range(0,K):
min = x
for y in range(x + 1, K):
if no[min]> no[y]:
min = y
temp= no[min];
no[min] = no[x]
no[x]=temp
print("Pass: ",x+1,"=",no)
print("Final List:",no)
3 1954 12 10no=
0 1 2 3 4 5
x=3 min=x
K
Outer loop [this is pass 4]
Inner loop start where y starts from x+1 to K
y=4 3 1954 12 10 min=3x=3
y=4
K=6(less than 6)
If 19>12 TRUE min value change to 4
min=3
32. SELECTION SORT:
no=[10,19,5,4,12,3]
K=len(no)
for x in range(0,K):
min = x
for y in range(x + 1, K):
if no[min]> no[y]:
min = y
temp= no[min];
no[min] = no[x]
no[x]=temp
print("Pass: ",x+1,"=",no)
print("Final List:",no)
3 1954 12 10no=
0 1 2 3 4 5
x=3 min=x
K
Outer loop [this is pass 4]
y=4
y=5
3 1954 12 10
min=4x=3
y=5
K=6(less than 6)
If 12>10 TRUE min value change to 5
min=4
3 1954 12 10
33. SELECTION SORT:
no=[10,19,5,4,12,3]
K=len(no)
for x in range(0,K):
min = x
for y in range(x + 1, K):
if no[min]> no[y]:
min = y
temp= no[min];
no[min] = no[x]
no[x]=temp
print("Pass: ",x+1,"=",no)
print("Final List:",no)
3 1954 12 10no=
0 1 2 3 4 5
x=3 min=x
K
Outer loop [this is pass 4]
y=4
y=5
min=5
x=3
Now Swapping start
tmp= 10 temp=no[min]
min=5
3 1954 12 10
3 1954 12 10
x=3
swap
Inner loop finish
no[min]=no[x]no[5]= 19
no[3]= 10 no[x]=temp191054 123
Pass 4 Final value:
35. 10 1954 123
PASS 5 STARTS Where X=4
Sorted Value
Y=x+1=5
K
x=4
Inner loop
Outer loop
36. SELECTION SORT:
no=[10,19,5,4,12,3]
K=len(no)
for x in range(0,K):
min = x
for y in range(x + 1, K):
if no[min]> no[y]:
min = y
temp= no[min];
no[min] = no[x]
no[x]=temp
print("Pass: ",x+1,"=",no)
print("Final List:",no)
3 1054 12 19no=
0 1 2 3 4 5
x=4 min=x
K
Outer loop [this is pass 5]
Inner loop start where y starts from x+1 to K
y=5 3 1054 12 19 min=4x=4
y=5
K=6(less than 6)
If 12>19 FALSE min value remain same
min=4
37. SELECTION SORT:
no=[10,19,5,4,12,3]
K=len(no)
for x in range(0,K):
min = x
for y in range(x + 1, K):
if no[min]> no[y]:
min = y
temp= no[min];
no[min] = no[x]
no[x]=temp
print("Pass: ",x+1,"=",no)
print("Final List:",no)
3 1054 12 19no=
0 1 2 3 4 5
x=3 min=x
K
Outer loop [this is pass 4]
y=5
min=4
x=4
Now Swapping start
tmp= 12 temp=no[min]
min=4
3 1054 12 19
x=4
swap
Inner loop finish
no[min]=no[x]no[4]= 12
no[4]= 12 no[x]=temp191054 123
Pass 5 Final value: