Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Also you are missing a period after 'moon'
The tests don't accept the oxford comma - which they really should :)
I also was stumped by this, but understand now. Range returns a sequence between two numbers, so if there is no step/sequence between the two numbers, then there is subsequent number to return. Therefore, only one value is returned.
My test is failing?! but the answer is correct..
It says:
Test Results:
Testing for instance porsche of class Vehicle...
"Hi, I'm one of those Vehicles! Have a look at my engine, seats, and wheels." should equal "Hi, I'm one of those Vehicles! Have a look at my engine, seats and wheels."
Testing for instance earth of Planet...
"Hi, I'm one of those Planets! Have a look at my moon" should equal "Hi, I'm one of those Planets! Have a look at my moon."
Amazing
I still don't understand the description... there are a few strange English phrases. Can I suggest something like this?
You can see below I have changed some tenses, and some wordings.
Introduction
Little Petya very much likes sequences. However, recently he received a sequence as a gift from his mother. Petya didn't like it at all! He decided to make a single replacement. After this replacement, Petya would like to the sequence in increasing order.
He asks himself: What is the lowest possible value I could have got...(got from... the total? got from where?) after making the replacement and sorting the sequence?
About the replacement:
Choose exactly one element from the sequence, and replace it with another integer > 0. You are not allowed to replace a number with itself, or to change no number at all.
Task:
Find the lowest possible sequence after performing a valid replacement, and sorting the sequence.
Input:
Input contains sequence with
N
integers. All elements of the sequence > 0. The sequenc will never be empty.Output:
Return sequence with
N
integers — which includes the lowest possible values of each sequence element, after the single replacement and sorting has been performed.