Instructions:
Welcome. In this kata, you are asked to square every digit of a number and concatenate them.For example, if we run 9119 through the function, 811181 will come out, because 92 is 81 and 1...
Instructions:
Complete the function that takes a non-negative integer n as input, and returns a list of all the powers of 2 with the exponent ranging from 0 to n ( inclusive ).Examples
n = 0 ==> [...
Instructions:
In this simple exercise, you will create a program that will take two lists of integers, a and b. Each list will consist of 3 positive integers above 0, representing the dimensions of cu...
Instructions:
We need a function that can transform a number (integer) into a string.
What ways of achieving this do you know?Examples (input --> output):
123 --> "123"
999 --> "999"
-100 -...
Instructions:
Complete the method that takes a boolean value and return a "Yes" string for true, or a "No" string for false.Thoughts:
I used a ternary operator to cheek if the parameter is true. If it...
Instructions:
You like building blocks. You especially like building blocks that are squares. And what you even like more, is to arrange them into a square of square building blocks!
However, sometime...
Instructions:
You are going to be given a non-empty string. Your job is to return the middle character(s) of the string.
If the string's length is odd, return the middle character.
If the string's len...
Instructions:
If you can't sleep, just count sheeps!!Task:
Given a non-negative integer, 3 for example, return a string with a murmur: "1 sheep...2 sheep...3 sheep...". Input will always be valid, i.e...
Instructions:
Complete the function that accepts a string parameter, and reverses each word in the string. All spaces in the string should be retained.Examples
"This is an example!" ==> "sihT si na...
Instructions:
Implement the function unique_in_order which takes as argument a sequence and returns a list of items without any elements with the same value next to each other and preserving the origi...