Retired
Function 3 - multiplying two numbers (retired)
511 of 57,628ineiti
Loading description...
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.
error: could not find `Cargo.toml` in `/workspace` or any parent directory
, issue raised when try to test the code in Rustcan not submit
You can't submit on a retired kata or in a draft.
I solved the task correctly, but the subtit button does not appear
all green
And it's because it is a retired kata. Solve only approved or beta katas if you want to be able to submit them.
Thats because the kata has been retired, and it does not accept solutions anymore.
ok Thank you
The python translation's random tests can test with zeros, but don't always, allowing solutions that don't handle zero correctly to pass. Zero inputs should be tested explicitly in the basic test cases. Fix
This comment has been hidden.
TSError: ⨯ Unable to compile TypeScript: test.ts:1:27 - error TS2306: File '/workspace/default/solution.ts' is not a module.
1 import solution = require('./solution'); ~~~~~~~~~~~~
dont know if i can do anyhthing to solve this issue. sounds to me there is something wrong with their test code
You're missing some
export
Yeah, this is a simple one but poorly written. It fails to mention that the function has to be explicitly 'multiply', I had something else and couldnt not figure out for the life of me why.
I like how everyone in the solutions section is showing off their skills with this tiny challenge 😂
Well , this was a simple code but i almost lose myself here LOL
Should say that function needs to be named multiply...
I thought I was going crazy ...
I do not understand why my code doesnt work..In console it works
console.log
just prints to the console and returns undefined, remove it.just make a name of funtion multiply
should probably update the kata to specificly say "call your funtion multiply()"
Poorly designed language support.
This comment has been hidden.
The function's name should be
multiply
. Read this: https://docs.codewars.com/training/troubleshooting/Javascript. Should use import/from instead of require().
why tho
You should mention that function should actually return something.
This comment has been hidden.
Do not prompt inputs from user, this is not hw CW works !
specify that the function must be called Multiply... I was stuck for 10x longer than I needed to be because I called my function something else...
Multiple forks created to require user to create function from scratch, to maintain consistency
The current solutions shouldn't be invalidated, because done of the tests were changed, only the solution setup.
Additionally, some languages(COBOL) have this problem too, but I don't want to change those, as I don't know anything regarding the languages.
Approved ,thanks !
C
sample test gives errorundefined reference to `foo'
Fixed in new fork
would help if you at least mention that the function needs to be called multiply.....
I like that this requires one to wrote the function from scratch. I think that should be the case more often, as without it we often get less practice on function variables - and that's a tricky topic.
Should state that the function needs to be called multiply in JS.
This comment has been hidden.
In Python it doesn't say that the function must be called multiply - need to fix the Details
function name is given in sample tests, read them.
COBOL translation
o_O
sup :)
pretty close to getting 6 kyu in COBOL
getting past that magic border is sooooo last minute ;)
I might have gone ahead and just started translating left and right :) so can finally hit 6 kyu. short by 1 kata
This comment has been hidden.
sure is, are you translating or should I go for it :)
P.S : translated this
.
translated
Why is the function's name mult instead of multiply in COBOL?
multiply
is a reserved word in COBOL.Yeah, that's what I suspected. I think all languages should have a note about what's the function's name or initial code, some have one or two of those, some have neither.
Duplicate
Forked python translation with new test framework used and 3.8 enabled
Duplicate; boring; trivial. The only thing stopping me from solving in every language possible is I can't be bothered to google the function syntax :(
edit: Go function should probably be changed to "multiply" not "Multiply" Swift has one test - and it's not even random :(
Not an issue.
Read the naming conventions.
Fixed (I think).
in Go, the description asks for a function called 'multiply', but the tests ask for a function called 'Multiply'
Ruby test case Test.assert_equals(multiply(3, 5), 15)
Server Execution Error:
The name of the test module must end with 'Spec'
Request Error:
Request failed with status code 422. This error was caused due to an issue processing the web request, not because of an issue executing your code. You can retry the request.
UMMMMMMMMMMMMMM..... pls fix. whatever this is
Fixed.
ty :D
This comment has been hidden.
hi, you should not post code without a spoiler tag (even if it's wrong) otherwise everyone can see it, which is forbidden.
This comment has been hidden.
Not an issue. Your macro is wrong.
No it's not. Anyway, the issue has been fixed it seems.
C# version says function has to be called "multiply", but the tests and the starting code expect it to be called "Multiply" - capital M. Calling the function "multiply" as the spec says does not compile the tests.
It is the same in Go.
Fixed.
I want to pass this kata just so I can downvote it.
This comment has been hidden.
Hey guys,
I just did this kata using golang and noticed something. From the problem statement, we are to create a method
multiply
(all lower case) but the tests expect a functionMultiply
(notice uppercase m). The only way to solve it is to useMultiply
so that the tests pass.Cheers.
=hi guys!
@jack.tang ..
Haskell needs an update. 8.2 is not supported by kata yet is avaliable.
Some languages need sample tests. The languages that need tests are :
Added sample tests everywhere.
This comment has been hidden.
The tests had not been updated to support the newer versions of the testing library.
Workaround: Pick 'GHC 7.10.3' instead of 'GHC 8.2'. Should be next to the language select dropdown menu.
Already fixed.
Hello guys,
I've tried to translate this kata into Solidity but I've forgotten to check the author. He's inactive since Oct 2017. Can somebody take a look and approve the translation if it's okay. Thanks in advance.
@yMk4 ..
can you add some test-cases to the javascript solution.
for beginners it may be confusing when their code does not seem to work when they hit "attempt"
This comment has been hidden.
That's not an issue. There is just no sample tests.
In swift, the comment is breaking the kata. Keep the comment and code times out . . . remove it and it passes every time
C translation kumited. :)
This comment has been hidden.
why bother creating a kata like this?
This comment has been hidden.
I got the same error. Were you able to find out what's going on?
i did not. 🙁
Typescript translation kumited! please accept :D
This comment has been hidden.
That's working correctly. Did you get "Unknown Error" or "Submission timeout". Because those are usually not related to a problem in your code, being caused by connectivity problems or lack of test cases.
"Run Tests" in this kata will give Unknown error, because there are no tests to run. Use submit instead.
I really wish, I'd read your comment an hour ago! :/
This doesn't seem to be an issue currently.
Hi, I've added a CoffeeScript translation, if you want to approve it, instructions for the approval process are here.
Python translation submitted :)
This comment has been hidden.
You need to return the value, not
puts()
it.Maybe it should test multiplication of negative numbers? This creative solution passes, but could go into a never ending loop.