Programming Articles

Page 141 of 2547

A simple News app with Tkinter and Newsapi

Rohan Singh
Rohan Singh
Updated on 27-Mar-2026 902 Views

Tkinter is a Python library that is used to create desktop applications for Windows and UNIX-based operating systems. Tkinter provides many widgets to build interactive applications with graphical user interfaces. Today there are vast sources of information available on the internet. News is constantly coming from global sources to local sources. Keeping track of the latest news is a daunting task. In this article, we will build a simple News app with Tkinter and NewsAPI. What is NewsAPI? NewsAPI is an Application Programming Interface (API) that provides access to news articles and breaking news across the world ...

Read More

8-bit game using pygame

Rohan Singh
Rohan Singh
Updated on 27-Mar-2026 2K+ Views

Pygame is an open-source Python library used for making games. It provides various functions and tools for creating games, sound processing, and graphics. Pygame is a cross-platform library that works on Windows, Linux, and macOS. What is an 8-bit Game? 8-bit games were very popular in the 1980s. These video games featured graphics and sound created using 8-bit technology — a limited color palette and sound range that fall within the 8-bit range. In this article, we will create an 8-bit style game using pygame with minimal graphics. Before creating an 8-bit game using pygame, we need ...

Read More

7 Reasons Why You Should Learn Python in 2023

Rohan Singh
Rohan Singh
Updated on 27-Mar-2026 518 Views

Python programming language was developed in 1991 and is an open source programming language. In recent years Python has gained immense popularity and has a huge developer support ecosystem which makes it easy to use and a versatile programming language. With its easy-to-understand syntax, it is one of the best beginner programming languages to start with. It is widely used in different technological fields like web development, game development, machine learning, artificial intelligence, and data analytics by businesses. In this article we will see why you should learn the Python programming language in 2023. Reasons Why You Should Learn ...

Read More

How to Create and Customize Venn Diagrams in Python?

Manthan Ghasadiya
Manthan Ghasadiya
Updated on 27-Mar-2026 1K+ Views

Venn diagrams are visual representations used to show relationships between different sets of data. Python's matplotlib-venn library provides powerful tools to create and customize these diagrams with ease. The matplotlib-venn library extends matplotlib's functionality specifically for creating Venn diagrams. It supports both 2-set and 3-set diagrams with extensive customization options including colors, labels, and styling. Installation First, install the required library ? pip install matplotlib-venn Basic Two-Set Venn Diagram Here's how to create a simple intersection of two sets ? import matplotlib.pyplot as plt from matplotlib_venn import venn2, venn2_circles ...

Read More

How to create an ogive graph in python?

Manthan Ghasadiya
Manthan Ghasadiya
Updated on 27-Mar-2026 688 Views

An ogive graph graphically represents the cumulative distribution function (CDF) of a dataset, also known as a cumulative frequency curve. It helps analyze data distribution and identify patterns and trends. Python provides libraries like Matplotlib, Pandas, and NumPy to create ogive graphs effectively. What is an Ogive Graph? An ogive is a line graph that shows the cumulative frequency of data points up to each value. The curve typically starts at zero and rises to the total frequency, creating an S-shaped curve that reveals distribution characteristics. Syntax # Calculate cumulative frequency freq, bins = np.histogram(data, ...

Read More

How to create BMI calculator web app using Python and PyWebio?

Manthan Ghasadiya
Manthan Ghasadiya
Updated on 27-Mar-2026 698 Views

PyWebIO is a Python library that enables you to build web applications with simple user interfaces without requiring HTML and JavaScript knowledge. This tutorial demonstrates how to create a BMI (Body Mass Index) calculator web app using two different approaches. BMI measures body fat based on weight and height, commonly used to determine if a person is underweight, normal weight, overweight, or obese. Method 1: Object-Oriented Approach This method uses a class-based structure to organize the BMI calculation logic ? from pywebio.input import input, FLOAT from pywebio.output import put_text class BMICalculator: ...

Read More

How to Create a Sequence of Linearly Increasing Values with NumPy Arrange?

Manthan Ghasadiya
Manthan Ghasadiya
Updated on 27-Mar-2026 651 Views

NumPy is a Python library widely used for numerical computations and scientific data analysis. One of the most commonly used functions is numpy.arange(), which creates a sequence of linearly increasing values with a given start, stop, and step size. This tutorial examines how to use numpy.arange() to produce sequences of linearly increasing values. Syntax numpy.arange([start, ]stop, [step, ], dtype=None) Parameters start − Starting value of the sequence (optional, default is 0) stop − End value of the sequence (not included) step − Spacing between values (optional, default is 1) dtype − Data type of ...

Read More

Python 3 Program For Range LCM Queries

Rudradev Das
Rudradev Das
Updated on 27-Mar-2026 355 Views

Range LCM queries involve finding the Least Common Multiple (LCM) of all elements in a given range of an array. This is a common problem in competitive programming that requires efficient data structures like segment trees to handle multiple queries quickly. The LCM (Least Common Multiple) of numbers in a range [a, r] is calculated as: LCM(a, r) = LCM(arr[a], arr[a+1], ..., arr[r]) We use the mathematical relationship: LCM(a, b) = (a * b) / GCD(a, b) where GCD is the Greatest Common Divisor. Using Segment Tree Approach A segment tree efficiently handles ...

Read More

Python Program to Count Inversions of Size Three in A Given Array

Rudradev Das
Rudradev Das
Updated on 27-Mar-2026 750 Views

An inversion of size three in an array occurs when three elements at indices i < j < k satisfy arr[i] > arr[j] > arr[k]. This is different from regular inversions which only consider pairs. Let's explore three approaches to count such inversions efficiently. Understanding Inversions of Size Three For an array to have an inversion of size three, we need three elements in decreasing order but with increasing indices ? Array: [8, 4, 2, 1] Inversions of size 3: (8, 4, 2), (8, 4, 1), (8, 2, 1), (4, 2, 1) Count: 4 Array: ...

Read More

What is the Pointer in Python? Does a Pointer Exist in Python?

Tushar Sharma
Tushar Sharma
Updated on 27-Mar-2026 2K+ Views

Low-level programming languages like C or C++ frequently use pointers to directly handle memory. They enable effective memory management and low-level data manipulation. Python, a high-level language, abstracts away the low-level complexities of memory management. Because of this, Python lacks explicit pointers in the same manner as C or C++. Instead, Python uses a concept called references, which enables indirect access to objects in memory through variables. Understanding Python References Everything is an object in Python, and objects are stored in memory. When you define a variable in Python, you are creating a reference to an object. ...

Read More
Showing 1401–1410 of 25,469 articles
« Prev 1 139 140 141 142 143 2547 Next »
Advertisements