Found 33676 Articles for Programming

How to add moving platforms in PyGame?

Priya Mishra
Updated on 31-May-2023 16:08:33

571 Views

In various games that contain platforms, moving platforms are mainly essential elements of the gameplay to make the game more interactive and challenging. PyGame is a popular Python library that is widely used to create 2-dimensional games. In this article, we will discuss how to add moving platforms to a game using PyGame and will see an example program to demonstrate the process. What are moving platforms? A moving platform is a flat and solid surface on which the player can walk or jump. These platforms are often used in games that contain platforms so that they can provide new ... Read More

How to add metadata to a DataFrame or Series with Pandas in Python?

Priya Mishra
Updated on 31-May-2023 16:06:46

3K+ Views

One of the key features of Pandas is the ability to work with metadata, which can provide additional information about the data that is present in a DataFrame or Series. Pandas is a powerful and widely used library in Python which is used for data manipulation and analysis. In this article, we will explore how to add metadata to a Dataframe or a Series with Pandas in Python. What is metadata in Pandas? Metadata is the information about the data in a DataFrame or Series. It can include information about the data types of the columns, the units of measurement, ... Read More

How to Add Leading Zeros to a Number in Python?

Priya Mishra
Updated on 31-May-2023 15:42:35

25K+ Views

While working with numbers in Python, it is often necessary to add leading zeros to a number. Adding leading zeros to a number is important when you are dealing with formatted data or when you need to ensure that a certain number of digits are present in a number, or in a more readable form. In this article, we will explore different methods that can be used to add leading zeros to a number in Python. What are the methods to Add Leading Zeros to a number? In programming, it’s often necessary to format numerical data in a specific way ... Read More

How to add drag behavior in kivy widget?

Priya Mishra
Updated on 31-May-2023 15:39:50

700 Views

Adding drag behavior in a Kivy widget can be a useful feature for a range of applications, including educational applications, productivity tools, and games. Dragging objects on the screen is one of the essential features of the natural user interface. We will be using a class in Kivy known as DraggableButton which will help us to drag the kivy widget like a button. In this article, we will be discussing the steps for adding drag behavior in kivy widget. What is drag behavior? Drag behavior is the most used user interaction pattern that allows the users to move the widgets ... Read More

How to add custom fonts in Kivy - Python?

Priya Mishra
Updated on 31-May-2023 15:37:34

1K+ Views

Kivy has the ability to use and add custom fonts to the widgets that are being used in the applications, which can help developers to add a personalized and unique touch to their applications. Adding a custom font in kivy involves two major steps which are loading the custom font in kivy, and after that applying the font to the appropriate widgets like a button or a window. This can be done by using the pre-defined methods that are available in kivy. In this article, we will discuss the process of adding custom fonts in Kivy, which will include installation ... Read More

Histogram in pygal

Priya Mishra
Updated on 31-May-2023 15:33:05

316 Views

 Pygal is a Python library that is used for creating interactive charts and graphs, one of the charts that Pygal supports is the histogram. Histogram is basically a graphical representation of the distribution of numerical data which helps us to quickly identify patterns, outliers, and trends in a dataset provided. In this article, we will be discussing the basics of histograms and how to create a histogram in Pygal, including the customization of charts and adding data to them. What is a Histogram? A histogram is a graphical representation of the distribution of the dataset. It mainly displays the frequency ... Read More

Appending a dictionary to a list in Python

Priya Mishra
Updated on 31-May-2023 15:27:56

5K+ Views

Dictionaries allows us to store key-value pairs, while lists allow you to store multiple values in a single variable and one common task is to append a dictionary to a list, which can be useful for storing multiple dictionaries in a single list. In this article, we will explore how to append a dictionary to a list in Python using different methods. We will provide examples and step-by-step instructions on how to do this. Introduction Python provides a wide variety of built-in data structures, which makes programming simple and effective. In contrast to other data structures, each of these Python ... Read More

Animated Floating Action Button in kivy

Priya Mishra
Updated on 31-May-2023 15:24:19

536 Views

In kivy, one of the most popular UI components in modern mobile is the Floating action button(FAB), which is used to represent the primary action of the applications. Kivy is an open-source Python framework that is used fr creating cross-platform user inerfaces. In this article, we will discuss how to create an animated floating action button in Kivy. What is a floating Action button in Kivy? The floating action button is a circular button that is typically placed in the bottom-right corner of the Kivy screen. It is mainly used to represent the primary action of the application and provides ... Read More

What is advanced Java?

Priya Mishra
Updated on 06-Aug-2024 18:35:28

10K+ Views

Introduction to Advanced Java Core Java (J2SE) and Advanced Java are the two components that make up the Java programming language (JEE). The foundations of the Java programming language, including its data types, functions, operators, loops, threads, and exception handling, are discussed in the "core Java" section of this book. It is used in the process of developing apps for widespread usage. Whereas Intermediate Java focuses on more advanced topics, such as database connection, networking, Servlet, web services, and so on, Advanced Java addresses more fundamental ideas. In this article, we will talk about what advanced Java is, and the concepts ... Read More

OpenCV Python Program to analyze an image using Histogram

Gireesha Devara
Updated on 31-May-2023 15:18:14

737 Views

A histogram is a graphical representation showing how the pixel intensities (ranging from 0 to 255) are distributed in an image. For a digital image histogram plots a graph between pixel intensity versus the number of pixels. The x-axis has intensity variations, and the y-axis indicates the number of pixels in that particular intensity. We can see the images and its histograms. By simply looking at the histogram of an image, we can get basic idea about contrast, brightness, intensity distribution etc of that image. In this article, we will write a python program using the OpenCV module ... Read More

Advertisements