Modify Array of Strings by Replacing Characters

Divya Sahni
Updated on 25-Jul-2023 13:28:25

269 Views

Modifying an array of strings by replacing characters repeating in the same or remaining strings is a common problem in programming. It can be solved using hash tables, sets, arrays etc. The aim is to improve the time and space requirements while providing the same functionality. This problem can be encountered in many real-life scenarios, such as processing large text or cleaning up datasets with duplicates. Problem Statement Given an input string array arr[] containing lowercase and uppercase characters. The goal is to modify the array by removing characters from the strings which are repeating in the same string or ... Read More

Use if, else & elif in Python Lambda Functions

Prince Yadav
Updated on 25-Jul-2023 13:27:20

6K+ Views

Python is a versatile and powerful programming language known for its simplicity and readability. One of the key features that make Python stand out is its support for lambda functions, which are anonymous functions that can be created on the fly. Lambda functions offer a concise and elegant way to define small, one−line functions without the need for a formal function definition. These functions can be used in various scenarios to enhance code readability and maintainability. In this tutorial, we will delve into the fascinating world of lambda functions in Python and explore how to incorporate if, else, and elif ... Read More

Minimum Number of Basic Logic Gates for Boolean Expression

Divya Sahni
Updated on 25-Jul-2023 13:26:02

1K+ Views

Logic gates are the basic building block of a digital circuit. They take in one or two binary inputs and return a binary output. Since, using the term binary, the output and input can either be 0 or 1 or it can be said as “false” and “true” or “low” and “high”. There are 3 basic logic gates − AND Gate AND gate has two or more inputs and one output. It produces a high output if all inputs are high. The truth table for a two-input AND gate is given below − Input 1 Input 2 Output ... Read More

Process Incoming Request Data in Flask

Prince Yadav
Updated on 25-Jul-2023 13:23:20

621 Views

Efficiently processing incoming request data is an important aspect of web development, and Flask offers developers an intuitive solution for handling and managing client−sent data. As a widely−used micro web framework for Python, Flask simplifies the entire process, whether it involves form submissions, AJAX requests, or API calls. Leveraging the powerful features of Flask, developers can effortlessly access and process diverse types of incoming data, including form data, JSON payloads, and query parameters. This article divides into a comprehensive exploration of various techniques and provides practical examples to effectively handle incoming request data in Flask. From leveraging the request ... Read More

Check Reachability of Any Point on Circle from Origin

Divya Sahni
Updated on 25-Jul-2023 13:21:11

123 Views

The circumference of a circle can be defined as the outer boundary of the circle. It is the perimeter of a circle. Each point around a circle follows certain properties as follows − Point (x, y) lying inside the circle such that, $\mathrm{x^2 + y^2 < R^2}$ Point (x, y) lying on the circle such that, $\mathrm{x^2 + y^2 = R^2}$ Point (x, y) lying outside the circle such that, $\mathrm{x^2 + y^2 > R^2}$ where R = radius of the circle. Problem Statement Given a string S representing a sequence of moves (L, R, U, D) and ... Read More

Create a New Project in Django Using Firebase Database

Prince Yadav
Updated on 25-Jul-2023 13:18:51

2K+ Views

Django, a powerful and popular Python web framework, has revolutionized the way developers create dynamic web applications. With its robust features and ease of use, Django has become a go−to choice for building scalable and secure websites. On the other hand, Firebase, a cloud−based platform provided by Google, offers a comprehensive suite of tools for app development, including real−time databases, authentication, and hosting. In this tutorial, we will explore how to create a new project in Django using Firebase as the database. We'll dive into the step−by−step process of setting up the development environment, configuring Django to work with ... Read More

Create a List of Objects in Python Class

Prince Yadav
Updated on 25-Jul-2023 13:13:08

10K+ Views

Python is a dynamic and skilled programming language that supports object−oriented programming (OOP). At the heart of OOP is the concept of objects, which are instances of a class. Classes in Python serve as blueprints for creating objects with specific attributes and methods. One common use case in OOP is to create a list of objects, where each object represents a unique instance of the class. In this article, we will talk about the process of creating a list of objects within a Python class. We will discuss the essential steps involved, including defining a class, creating objects of that ... Read More

Building Progressive Web Games with JavaScript and HTML5 Canvas

Mukul Latiyan
Updated on 25-Jul-2023 13:04:28

1K+ Views

In recent years, the web platform has evolved significantly, enabling developers to create more powerful and interactive applications. With the introduction of HTML5 and JavaScript, developers now have the tools to build not just websites but also games that can run directly in the browser. In this article, we will explore the process of building a Progressive Web Game using JavaScript and HTML5 Canvas, with a practical example of a "Brick Breaker" game. What are Progressive Web Games? Progressive Web Games are web-based games that leverage modern web technologies to provide a rich and immersive gaming experience. They are ... Read More

Create List of Files, Folders, and Subfolders in Excel Using Python

Prince Yadav
Updated on 25-Jul-2023 13:03:14

954 Views

Python is a great programming language widely used for various data manipulation tasks. When working with files and folders, it can be useful to generate a list of all the files, folders, and subfolders within a directory. Excel, on the other hand, is a popular spreadsheet application that allows users to organize and analyze data. In this detailed article, we will explore step−by−step how to use Python to create a comprehensive list of files, folders, and subfolders in Excel, providing a convenient way to manage and analyze file structures. So make sure to stick with this till the end. Prerequisites ... Read More

Check if a Given String is a Comment or Not

Divya Sahni
Updated on 25-Jul-2023 12:53:09

2K+ Views

In computer programming, comments are text written with the source code but ignored by the compiler or interpreter. They are used to provide readability of code by describing the code and its functionality for someone who is reading the code other than a compiler or interpreter. They are not executed and do not affect the functionality of the overall program, they are just for programmer guidance. Each programming language has a different syntax to represent comments. Here are a few examples − C/C++ − In C or C++, single-lined comments begin with ‘//’ and multi-liner comments are enclosed in ... Read More

Advertisements