# Category: Python Programs

### Program for Tower of Hanoi using Python

91 Introduction The task is to solve Tower of Hanoi problem using python programming. There are set of rules to follow while solving the problem: At […]

### Program to print smallest m digit number divisible by n using Python

29 Introduction The task to find and print the smallest M digit number divisible by N. Program def result(n, m):     x = pow(10, m-1)    […]

### Program to find product of unique prime factors of a given number using Python

58 Introduction The task is to print the product of unique prime factors of the given number. Program def find(ip_num): # Initializing product with 1     […]

### Program for Sieve of Eratosthenes using Python

106 Introduction The task is to print all the prime numbers smaller than or equal to the given number n (given n must be small).   […]

### Program to print the matrix in Z form using Python

40 Introduction Given a matrix of size n*n, the task is to print the elements in Z form. Program ip_array = [[1, 2, 3],                 […]

### Program for number of stopping station problems using Python

33 Introduction The task is to find the number of ways we can stop the train at K stations out of N stations between S1 and […]

### Program to find the most frequent character with its occurrence count using Python

148 Introduction The task is to find the frequent occurred character in the given string with it occurrence number.   Program from collections import Counter def […]

### Program to find the minimum sum of factors of given number using Python

72 Introduction The task is to find the minimum sum of factors of the given number. Program def find(ip_no): # Initilize sum with 0     output_sum […]

### Program to find the maximum height when coins are arranged in triangle using Python

74 Introduction Given N number of coins, the task is to construct a triangle of maximum height H and print the max height. Program def sq_root(val): […]

### Program for Legendre’s Conjecture using Python

57 Introduction There is always one prime between n2 and (n+1)2 . The task is to print all the prime number between the range n2 to […]

Translate »