How to Sum The Strings in Python
The challenge
Create a function that takes 2 nonnegative integers in form of a string as an input, and outputs the sum (also as a string):
Example: ( …
Read Article →320 articles about python development, tools, and best practices
Create a function that takes 2 nonnegative integers in form of a string as an input, and outputs the sum (also as a string):
Example: ( …
Read Article →Everyone knows passphrases. One can choose passphrases from poems, songs, movies names and so on but frequently they can be guessed due …
Read Article →You are given an m x n binary matrix grid. An island is a group of 1‘s (representing land) connected 4-directionally (horizontal or …
Automatons, or Finite State Machines (FSM), are extremely useful to programmers when it comes to software design. You will be given a …
Read Article →I will give you an integer. Give me back a shape that is as long and wide as the integer. The integer will be a whole number between 1 …
Read Article →Complete the solution so that it returns true if the first argument(string) passed in ends with the 2nd argument (also a string). …
Read Article →Python comes with a built-in method on all String types, by calling lower() on a String, you can immediately lower the case of that String.
If you have a decimal number, and want to get it’s binary value, you can use the built-in bin method.
decimal = 32
binary = bin(decimal)
# …
Read Article →
A binary gap within a positive integer N is any maximal sequence of consecutive zeros that is surrounded by ones at both ends in the …
Read Article →Given a non-negative integer, return an array / a list of the individual digits in order.
Examples:
123 => [1,2,3]
1 => [1] …
Read Article →
Create a Circular List
A circular list is of finite size, but can infititely be asked for its previous and next elements. This is …
Read Article →Don Drumphet lives in a nice neighborhood, but one of his neighbors has started to let his house go. Don Drumphet wants to build a wall …
Read Article →