Retired
Tetrad #1: Four objects of simple types (retired)
204nrr
Loading description...
Lists
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Maybe add - Challenge - See if you an you solve this in one line. Gets beginners thinking about simplifying code
The output type should be a tuple.
Sorry, but this is not issue.
Why not?
Updated the description (result None for non integer input) and tests with non-integers, please update your solutions.
The output type should be a tuple.
Why?
Because it's a standard practice to use correct data types? The result is a fixed-length immutable collection, why the hell are you using a
list
instead?Missing tests with non-integers.
Fixed. Please check.
Hi, the error message given is very confusing and not very helpful at all. Maybe change the way you test the user's code?
The description is also slightly wrong,
[ 3, 3.0, "3", ( 3 ) ]
should really be[ 3, 3.0, "3", ( 3, ) ]
(with a comma after the last3
to make a it a tuple).Also, have a look at the suggestion below
Fixed, but this was done on purpose.
Hi, please remove the spaces between the parameter in the function definition to follow pep8 :)
Sorry, but it's my style. Each has formatting settings in his code editor.
Yeah that's ok, but the setup code should really follow the language convention.
Where is this rule in wiki? See: https://www.google.com/search?q=site%3Ahttps%3A%2F%2Fgithub.com%2FCodewars%2Fcodewars.com%2Fwiki%2F+pep8 .
https://www.python.org/dev/peps/pep-0008/
More specifically: https://www.python.org/dev/peps/pep-0008/#whitespace-in-expressions-and-statements
And the Codewars kata creating rules explicitly states to
Follow Established (language) Conventions
: https://github.com/Codewars/codewars.com/wiki/Kata-Best-Practices#follow-established-conventionsI do not agree ( because the spaces between the parameter in the function definition more readable for me ), but fixed.
All spaces are reformatted according to the pep8 standard.
Nice :) Btw, there is no need to change your own code for the test cases. You just needed to change the setup code for the user.