Pavitra has Published 177 Articles

Python Program to find the area of a circle

Pavitra

Pavitra

Updated on 25-Sep-2019 12:18:21

454 Views

In this article, we will learn about the solution and approach to solve the given problem statement.Problem statement −Given the radius of a circle, we need to find a circle.The area of a circle can simply be evaluated using the following formula.Area = Pi*r*rLet’s see the implementation below −Example Live Demodef ... Read More

Python Implementing Web Scraping with Scrapy

Pavitra

Pavitra

Updated on 25-Sep-2019 12:04:21

137 Views

In this article, we will learn about the web scraping technique using the Scrappy module available in Python.What is web scraping?Web scraping is used to obtain/get the data from a website with the help of a crawler/scanner. Web scrapping comes handy to extract the data from a web page that ... Read More

Python Program for simple interest

Pavitra

Pavitra

Updated on 11-Sep-2019 13:21:02

1K+ Views

In this article, we will learn about the calculation of simple interest in Python 3.x. Or earlier.Simple interest is calculated by multiplying the daily interest rate by the principal amount by the number of days that elapse between the payments.Mathematically, Simple Interest = (P x T x R)/100 Where, P ... Read More

Python Program for Selection Sort

Pavitra

Pavitra

Updated on 11-Sep-2019 13:18:05

2K+ Views

In this article, we will learn about the Selection sort and its implementation in Python 3.x. Or earlier.In the selection sort algorithm, an array is sorted by recursively finding the minimum element from the unsorted part and inserting it at the beginning. Two subarrays are formed during the execution of ... Read More

Python program for removing nth character from a string

Pavitra

Pavitra

Updated on 11-Sep-2019 13:13:35

130 Views

In this article, we will learn about the solution to the problem statement given below −Problem statement − We are given a string, we have to remove the ith indexed character from the given string and display it.In any string in Python, indexing always starts from 0. Suppose we have ... Read More

Python Program for Product of unique prime factors of a number

Pavitra

Pavitra

Updated on 11-Sep-2019 13:10:13

930 Views

In this article, we will learn about the solution to the problem statement given below −Problem statement − Given a number n, we need to find the product of all of its unique prime factors available and return it.For example, Input: num = 11 Output: Product is 11 Explanation: Here, ... Read More

Python Program for Print Number series without using any loop

Pavitra

Pavitra

Updated on 11-Sep-2019 13:04:11

518 Views

In this article, we will learn about the solution to the problem statement given below −Problem statement − Given Two number N and K, our problem is to subtract a number K from N until number(N) is greater than zero(0), once the N becomes negative or zero then we start ... Read More

Python Program for n-th Fibonacci number

Pavitra

Pavitra

Updated on 11-Sep-2019 12:15:41

1K+ Views

In this article, we will compute the nth Fibonacci number.A Fibonacci number is defined by the recurrence relation given below −Fn = Fn-1 + Fn-2With F0= 0 and F1 = 1.First, few Fibonacci numbers are0, 1, 1, 2, 3, 5, 8, 13, ..................We can compute the Fibonacci numbers using the ... Read More

Python Program for nth Catalan Number

Pavitra

Pavitra

Updated on 11-Sep-2019 12:10:47

176 Views

In this article, we will learn about calculating the nth Catalan number.Catalan numbers are a sequence of natural numbers that are defined by the recursive formula −$$C_{0}= 1\:and\:C_{n+1}=\displaystyle\sum\limits_{i=0}^n C_{i}C_{n-i} for \:n\geq0;$$The first few Catalan numbers for n = 0, 1, 2, 3, … are 1, 1, 2, 5, 14, 42, ... Read More

Python Program for How to check if a given number is a Fibonacci number?

Pavitra

Pavitra

Updated on 11-Sep-2019 11:56:56

428 Views

In this article, we will learn about the solution to the problem statement given below −Problem statementGiven a number n, check whether n is a Fibonacci number or notWe all are aware that the nth Fibonacci number is the sum of the previous two Fibonacci numbers. But they also offer ... Read More

Advertisements