How to do Base64 Encoding in Python
The challenge
Create a function that converts the value of the String to and from Base64 using the ASCII character set.
Do not use built-in functions. …
Read Article →329 articles about python development, tools, and best practices
Create a function that converts the value of the String to and from Base64 using the ASCII character set.
Do not use built-in functions. …
Read Article →There is an array of strings. All strings contain similar letters except one. Try to find it!
find_uniq([ 'Aa', 'aaa', …
Read Article →
Complete the function/method so that it takes a PascalCase string and returns the string in snake_case notation. Lowercase characters …
When working with color values it can sometimes be useful to extract the individual red, green, and blue (RGB) component values for a …
Read Article →Write a hashtag generator function that takes a string and returns a #HashCodeString of it.
The hashtag generator should perform the …
Read Article →Write an algorithm that takes an array and moves all of the zeros to the end, preserving the order of the other elements.
move_zeros([1, …
Read Article →
Write a regular expression that validates the gregorian date in the format “DD.MM.YYYY”
Correct date examples: …
Read Article →Write your own implementation of the built-in split function in Python.
The following rules must be adhered to:
Create a domain name validator mostly compliant with RFC 1035, RFC 1123, and RFC 2181
The following rules apply:
Your task is to write a regular expression (regex) that will match a string only if it contains at least one valid date, in the format …
Read Article →You need to write regex that will validate a password to make sure it meets the following criteria:
The goal of this challenge is to write a function that takes two inputs: a string and a character. The function will count the number of …
Read Article →Write a nickname generator function, nicknameGenerator that takes a string name as an argument and returns the first 3 or 4 letters as a …
This function should test if the factor is a factor of base.
Return true if it is a factor or false if it is not.
About factors …
Read Article →There are 6 binary/bitwise operators in Python:
~)&)|)^)<<)>>)A …
Read Article →Write a function that checks if a given string (case insensitive) is a palindrome.
Option 1:
def …
Read Article →
You are given two arrays a1 and a2 of strings. Each string is composed of letters from a to z. Let x be any string in the first array …
You are be given a string that has lowercase letters and numbers. Your task is to compare the number groupings and return the largest …
Read Article →Finish the solution so that it sorts the passed-in array/list of numbers. If the function passes in an empty array/list or null/None …
Read Article →Count the number of occurrences of each character and return it as a list of tuples in order of appearance. For empty output return an …
Read Article →Given a sequence of numbers, find the largest pair sum in the sequence.
For example
[10, 14, 2, 23, 19] --> 42 (= 23 + 19)
[99, 2, …
Read Article →
Consider the word "abode". We can see that the letter a is in position 1 and b is in position 2. In the alphabet, a and b are …
Find the sum of the odd numbers within an array, after cubing the initial integers. The function should return None if any of the values …
Given a positive integer n, calculate the following sum:
n + n/2 + n/4 + n/8 + ...
All elements of the sum are the results of integer …
Read Article →