In this exercise it will be given an example of a sequence of numbers.
In this exercise the logic of sequence of numbers will be tested.
For this you have to create a function `number_logic` which will take a number `u32` and return `true` if the number is the sum of its own digits, each raised to the power of the number of digits, and `false` otherwise.
Your purpose is to determinate if the sequence returns true or false.
Examples:
For this you have to create a function `number_logic` that will take a number `u32` and return true if the number is the sum of its own digits, each raised to the power of the number of digits, and false otherwise.
By now you will have the knowledge of the so called rotational cipher "ROT13".
In this exercise, if you do not know about it already, you will learn about the rotational cipher "ROT13".
A ROT13 on the Latin alphabet would be as follows:
A ROT13 on the Latin alphabet would be as follows:
@ -12,19 +12,21 @@ A ROT13 on the Latin alphabet would be as follows:
Your purpose in this exercise is to create a similar `rotate` function that is a better version of the ROT13 cipher.
Your purpose in this exercise is to create a similar `rotate` function that is a better version of the ROT13 cipher.
Your function will receive a string and a number and it will rotate each letter of that string the number of times settled by the second argument to the right, or to the left if the number are negative.
Your function will receive a `string` and a `number` and it will rotate each letter of that `string` by the `number` of times settled by the second argument towards the right, or towards the left if the number is negative.
Your function should only change letters. If the string includes punctuation and numbers
Your `function` should only rotate letters. If the string includes punctuation and numbers