## Python Programming Internship

Pre-requisite / Skillset for Python Programming Internship 1. Intern should be well versed in examining Python syntax and semantics and must be fluent in the use of Python flow control and functions. 2. Should know how to demonstrate proficiency in handling strings and file systems. 3. Ability to create, run and manipulate Python Programs using … Read more

## Python Program to Find the Roots of a Quadratic Equation

This is a Python Program to find the roots of an equation. Problem Description The program takes the coefficients of an equation and finds the roots of the equation. Problem Solution 1. Take in the coefficients of the equation and store it in three separate variables. 2. Find the value of the discriminant, d. 3. … Read more

## Python Program to Print All Permutations of a String in Lexicographic Order using Recursion

This is a Python program to print all permutations of a string in lexicographic order using recursion. Problem Description The problem is the display all permutations of a string in lexicographic or dictionary order. Problem Solution 1. The algorithm work by creating a recursive function get_next_permutation that returns the next higher permutation of a sequence … Read more

## Python Program to Print All Permutations of a String in Lexicographic Order without Recursion

This is a Python program to print all permutations of a string in lexicographic order without using recursion. Problem Description The problem is the display all permutations of a string in lexicographic or dictionary order. Problem Solution 1. The algorithm work by first creating a loop that will run n! times where n is the … Read more

## Python Program to Minimize Lateness using Greedy Algorithm

This is a Python program to minimize maximum lateness using greedy algorithm. Problem Description We are given n requests numbered 0 to n – 1. Each request i has a time that it takes to complete t(i) and a deadline d(i). If a request i starts at time s(i), then its finish time is f(i) … Read more

## Python Program to Find the Smallest Set of Unit-Length Closed Intervals using Greedy Algorithm

This is a Python program to find smallest set of unit-length closed intervals that contains all points using greedy algorithm. Problem Description We are given a set of points on the x-axis. We have to find the minimum number of closed intervals of length 1 that will contain all of these points. Problem Solution 1. … Read more

## Python Program to Solve Interval Scheduling Problem using Greedy Algorithm

This is a Python program to solve the interval scheduling problem using greedy algorithm. Problem Description In the interval scheduling problem, we are given n activities numbered 0 to n – 1. Each activity i has a start time s(i) and a finish time f(i). Two activities i and j are mutually compatible if s(i) … Read more

## Python Program to Solve Fractional Knapsack Problem using Greedy Algorithm

This is a Python program to solve the fractional knapsack problem using greedy algorithm. Problem Description In the fractional knapsack problem, we are given a set of n items. Each item i has a value v(i) and a weight w(i) where 0 <= i < n. We are given a maximum weight W. The problem … Read more

## Python Program to Count all Paths in a Grid with Holes using Dynamic Programming with Bottom-Up Approach

This is a Python program to count all paths in an m x n grid with holes using dynamic programming with bottom-up approach. Problem Description We are given an m x n grid, i.e. a grid with m rows and n columns. We are also given a list of holes that the grid has. Each … Read more 