Server Side Programming Articles

Page 141 of 2109

Access environment variable values in Python

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

Environment variables in Python are configuration values stored outside the code and are used at runtime by the application. These variables are present in the form of key-value pairs just like dictionaries in Python. These variables can be set, updated, or removed from the configuration file without changing the application code. Python provides many operating system functions to access environment variables without affecting the code of the application. In this article, we will learn the ways in which we can access environment variables in Python. Using the OS Module In order to interact with the operating system, Python ...

Read More

A simple News app with Tkinter and Newsapi

Rohan Singh
Rohan Singh
Updated on 27-Mar-2026 935 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 535 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 727 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 723 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 681 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 387 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 771 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
Showing 1401–1410 of 21,090 articles
« Prev 1 139 140 141 142 143 2109 Next »
Advertisements