How to Fix String Casing in Python
The challenge
You will be given a string that may have mixed uppercase and lowercase letters and your task is to convert that string to either …
Read Article →In-depth guides, insights, and best practices for modern software engineering
You will be given a string that may have mixed uppercase and lowercase letters and your task is to convert that string to either …
Read Article →Remove all duplicate words from a string, leaving only single (first) words entries.
Input:
‘alpha beta beta gamma gamma gamma …
Read Article →ATM machines allow 4 or 6 digit PIN codes and PIN codes cannot contain anything but exactly 4 digits or exactly 6 digits.
If the …
Read Article →Take 2 strings s1 and s2 including only letters from ato z. Return a new sorted string, the longest possible, containing distinct …
Create a function that repeats each character by the amount of it’s index value of the original string.
Given two numbers and an arithmetic operator (the name of it, as a string), return the result of the two numbers having that operator …
Read Article →You are given two interior angles (in degrees) of a triangle.
Write a function to return the 3rd.
Note: only positive integers will be …
Read Article →Given 2 strings, a and b, return a string of the form short+long+short, with the shorter string on the outside and the longer string on …
Define a method hello that returns “Hello, Name!” to a given name, or says Hello, World! if name is not given (or passed as …
What if we need the length of the words separated by a space to be added at the end of that same word and have it returned as an array? …
Read Article →Write a function that reverses the words in a given string. A word can also fit an empty string. If this is not clear enough, here are …
Read Article →Define a function that removes duplicates from an array of numbers and returns it as a result.
The order of the sequence has to stay the …
Read Article →