Gireesha Devara has Published 173 Articles

Python Program to create an OTP by squaring and concatenating the odd digits of a number

Gireesha Devara

Gireesha Devara

Updated on 29-Aug-2023 14:30:09

323 Views

The task is to create a One-Time Password (OTP) by squaring and concatenating the odd digits of a given number.  Input Output Scenarios Following are the input-output scenarios for creating an OTP by squaring and concatenating the odd digits of a number Input number = 123456789 Output OTP: 19254981 ... Read More

Python program to create a list centered on zero

Gireesha Devara

Gireesha Devara

Updated on 29-Aug-2023 14:29:15

336 Views

Creating a list centered on zero involves generating a sequence of numbers where zero is positioned in the middle of the list. While the size of the list can be customized, it is often preferred to use an odd number to ensure symmetrical distribution of elements around zero. In this ... Read More

Python program to convert meters in yards and vice versa

Gireesha Devara

Gireesha Devara

Updated on 29-Aug-2023 14:25:59

419 Views

A meter is the fundamental unit of length in the International System of Units (SI) and is used worldwide. It is defined as the length of the path traveled by light in a vacuum during a time interval of 1/299, 792, 458 of a second. Meters are commonly used in ... Read More

Python Program to Count Vowels, Lines, and Characters in Text File

Gireesha Devara

Gireesha Devara

Updated on 29-Aug-2023 14:25:06

5K+ Views

When working with text processing and analysis tasks, it is frequently required to count the vowels, lines, and characters in a text file. The goal is to determine the total counts of vowels, lines, and characters present in the file. Python provides various methods and techniques that can be used ... Read More

Python program to count the number of blank spaces in a text file

Gireesha Devara

Gireesha Devara

Updated on 29-Aug-2023 14:21:43

2K+ Views

Blank spaces in a text file refer to the empty spaces or gaps between words, sentences, or characters. These spaces are typically represented by the space character (' ') or other whitespace characters, including tab ('\t'), newline (''), carriage return ('\r'), form feed ('\f'), and vertical tab ('\v'). These characters, ... Read More

Python Program To Convert dictionary values to Strings

Gireesha Devara

Gireesha Devara

Updated on 29-Aug-2023 14:19:41

956 Views

A dictionary in Python is an unordered collection of key-value pairs. It is a data structure that allows you to store and retrieve values based on a unique key associated with each value. Keys in a dictionary are used to uniquely identify values, and they must be immutable, such as ... Read More

Python program to convert float to exponential

Gireesha Devara

Gireesha Devara

Updated on 29-Aug-2023 14:18:23

4K+ Views

Float to exponential conversion involves transforming a decimal number, represented as a float, into exponential notation, also known as scientific notation. Exponential notation is commonly used for expressing very large or very small numbers in a concise manner, particularly in scientific and mathematical calculations. On the other hand, a float ... Read More

Python Program to convert Dictionary to List by Repeating keys corresponding value times

Gireesha Devara

Gireesha Devara

Updated on 29-Aug-2023 14:10:32

193 Views

In Python, dictionaries are key-value pairs where each key is associated with a corresponding value. When we want to convert a dictionary to a list by repeating keys, we need to iterate over each key-value pair and repeat the key based on its corresponding value. Input Output Scenarios See the ... Read More

Python program to convert Dict of list to CSV

Gireesha Devara

Gireesha Devara

Updated on 29-Aug-2023 14:07:37

2K+ Views

In a dictionary, keys must be unique and immutable, while values can be of any type and can have a list of values. In the case of a dictionary of lists, each key points to a list that can contain multiple elements.  Here's an example of a dictionary of lists ... Read More

Python program to Count Uppercase, Lowercase, special character and numeric values using Regex

Gireesha Devara

Gireesha Devara

Updated on 29-Aug-2023 14:05:18

1K+ Views

Regular expressions, commonly known as re or Regex is a powerful tool for manipulating and searching for patterns in text. In Python, regular expressions are implemented using the re-module. A regular expression is a sequence of characters that define a search pattern. The pattern is used to match and manipulate ... Read More

Advertisements