8 kyu
Grasshopper - Debug
12,729 of 25,410danleavitt0
Loading description...
Debugging
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.
what the hoem its same '171.66666666666666 is above freezing temperature' should equal '171.66666666666669 is above freezing temperature' i tried using round but it gave Basic Test Cases '13.333333 is above freezing temperature' should equal '13.333333333333334 is above freezing temperature' Test Passed '0.555556 is above freezing temperature' should equal '0.5555555555555556 is above freezing temperatur
i couldnt do anything i am using python please fix the issue why would any one want 7 to 8 decimal digits...
Yes, this kata is horrible, but you need to use the formula exactly as it is in the description. Yours is missing a pair of brackets.
can somebody help me debug this question
My friend will be fired the moment he gets back from the United States. Re-writing would be easier.
That friend has a serious programming skill issue if he can make a mistake like that on nearly every single line and not understand why everything fails.
Plz fix '0.0 is above freezing temperature' (Python)
C# translation ready! Please review and approve.
This comment has been hidden.
Sorry, but the formula is written in the description, if you use another one and that fails, it's not a kata issue.
The formula OP used is the exact same, aside from removing parentheses which mathematically shouldn't matter anyway.
This is dog ####. Please fix the Python version.
absolutely b.ll sh.t why you need to have 17 chars after . WHY
Expected: '0 is above freezing temperature' Actual : '0 is freezing temperature'
This is a plain wrong. 0 C is freezing and not above freezing. Try it out with water!
Next time, mention the language, it was PHP, right? Fixed.
Acheu bem legal o kata, é bom para treina o entendimento e a leitura do codigo.
In this practice, it was difficult to determine what the author considered to be a bug and what was not considered to be a bug.
In Java Script I found this kata worked for me --> however in Python had issues with:-
Expected: '13.333333333333334 is above freezing temperature', instead got: '13.333333333333332 is above freezing temperature'..
I found copying formula from description worked --> I think it is the exact order of operations that causes the problem.
Hope this helps
'I found copying formula from description worked --> I think it is the exact order of operations that causes the problem.'
Man, you're my savior!
Hello HedgehogInTheMist, Thanks mate! glad it pointed you in the right direction.
This comment has been hidden.
Too many buuugs
The whole kata is error. Why this kind of tasks still exists? Some bugs?? Seriously?? It would be more educational to write itt from scratch vs dealing with this "code"
Expected: '13.333333333333334 is above freezing temperature', instead got: '13.333333333333332 is above freezing temperature'..
seriously ??? calculation it self not giving 34 but giving 32 and how the hell I suppose to get that 34 ????
Had some problems in the beginning, but this was overall an easy kata. Thanks!
yet another stupid, bad kata take this rubbish down
public class GrassHopper {
}
test5 expected:<23.33333333333333[2] is above freezing t...> but was:<23.33333333333333[6] is above freezing t...>
1 HOUR I THINK BUT NOT FIND SOLUTION
This kata is bugged and it does not handle rounding properly. The fact that you have problems is not your fault. The kata is wrong. If you really want to pass tests, you need to use formula
double celsius = (temperature - 32.0) * 5 / 9.0;
. But it should not be necessary. It's kata error.This comment has been hidden.
your code is close to working, so you only need to figure out why you wrote this and what it does:
c <= -5
Why don't you round the solutions to a significance of 2 or something? These assertions are really bad for a level 8 kata imho. In Java i can't get the whole testsuite to wwork because of some error ini the 9 significance which would be idiotic when it's just a celsius converter.
That's the case for ruby; unfortunately the test cases get locked after a certain number of completions in a specific lnaguage and so no one can alter them :( If you are stuck, then I suggest playing around witht the order of operations in the formula, making sure you use a double not an int, and taking a look below. If you get really annoyed just post your code in spoiler and I'll help.
Error! expected:<7.77777777777777[8] is above freezing t...> but was:<7.77777777777777[9] is above freezing t...>
The kata is badly written - post your code with a spoiler and I should be able to help. Your formula needs to do operations in the correct order.
This comment has been hidden.
This comment has been hidden.
Thanks, it works.
I had the same issue when rounding values in Java:/
expected:<-11.66666666666666[6] is freezing tempera...> but was:<-11.66666666666666[8] is freezing tempera...> LoL
There are already several issues posted below about this. Which language?
Java. If the issue have aready been reported, maybe you can think about fix it ? It's a 8e kyu, not a 2e kyu. No need to put this kind of test, if the other are fine ...
This comment has been hidden.
Read the formula in the kata description again, fix yours.
wow, attention to detail is so important, I got it! - Thanks!
C++ Translation
This comment has been hidden.
BEFORE you post another issue about rounding problems in python, java, and js, this kata needs an exact answer. I'd like to draw your attention to the description:
Copy that EXACTLY and you will be fine in python and js. NOTE: division then multiplication. Tests are locked in js, java, and python. If you have rounding problems in other languages then post an issue.
For java, input temperature as a double not int.
For python, I copied "celsius = (fahrenheit - 32) * (5/9)" exactly and it still failed.
255.55555555555554 is above freezing temperature' should equal '255.55555555555557 is above freezing temperature 102.77777777777777 is above freezing temperature' should equal '102.77777777777779 is above freezing temperature
The formula is correct, what am I doing wrong? Thanks!
not sure :/ You'll have to post your code.
this kata is broken guys dont worry
I was wondering! I pass the test b ut then can't pass thesubmit because of different lengths on decimals!
This comment has been hidden.
Many issues about it have already been reported, plus you didn't bother telling us the language.
Make sure you're copying the formula exactly, with each bracket as is. If it's not helping, I suggest you move onto another kata, this one is terrible IMO.
Hey! My apologies for not writing the language, I was on lunch and probably rushing through the message. It was javascript, and I solved it. Thanks for the help!
dude maybe it helps you. Copy this formula to convert F to Celsius "(temp - 32) * (5/9)" i think your formula was "((temp - 32) *5) / 9"
Hey! I did have to modify that bit of code to get it to work as well, but I already completed this kyu. Thanks though!
This comment has been hidden.
This comment has been hidden.
Hi, I'm afraid this is a bit tricky in java and not a great kata anyway. You need to input temperature as a double not an int. (and then get rid of the double below)
Hello everyone, i'm here to say that case tests for Java are broken, since when the program runs the "convertToCelsius" function correctly debugged, it gives back results which are different from the ones in the test cases. Can someone fix it or can i..?
Thank you for reading, best regards.
Can you explain more please? Post what you think is the correct code.
This comment has been hidden.
Your solution might be good, but this kata is smiply broken. It handles floating point numbers incorrectly and requires mind reading skills or a crystal ball. Leave it, forget it, come back to it when it gets fixed.
Oh ok, thank you for your reply! I thought i was doing something wrong :/
Thank you for your answer, have a nice evening!
Just finished in java, seems to have fixed.
I still can't finish it, can you give me some sort of advice or help, please?
It's not fixed yet, don't believe him ;) But it's being worked on.
Yes, click on
SUBMIT
by writing the code which you think is right.Test description for python mentions rounding to 1 decimal place, but randomized tests require rounding to a changing number of decimal places.
'-28.333333333333332 is freezing temperature' should equal '-28.333333333333336 is freezing temperature' '103.88888888888889 is above freezing temperature' should equal '103.8888888888889 is above freezing temperature'
The tests appear to be generated by a typed library using a double. Rounding in this manner is incompatible with untyped languages. You should change the kata to round to 1 decimal place per your description to provide logical compatability.
This comment has been hidden.
The expected results that are generated for the random test cases are being rounded before being converted into strings. Since the expected result is a string, it isn't possible to pass by returning a float. When you convert a float to a string it's rounded automatically for you. Passing this in python would require replicating the exact same rounding method at a bit level in order to produce exactly the same string in every case.
The kata could be altered to accept a float value as the result. But as it is written now it requires concatenating with 'is freezing temperature' first
This comment has been hidden.
You are right, rounding requirements for this kata are off. You need to recreate formula exactly, i.e.
celsius = (fahrenheit - 32) * (5/9)
. When I usedcelsius = (fahrenheit - 32) * 5 / 9
, which is effectively the same, my answers got rejected due to rounding.@hobovsky - thank you!! you help me
The description isn't making any claim.
hey im a bit stuck can anyone help
Read this.
thank you chrono79
This comment has been hidden.
The formula for calculating celsius must be exactly the same as in the description.
Closing, because that's a duplicate issue.
This comment has been hidden.
'Looks like you've solved it'
Rounding issue in Python the random tests always fail.
PHP translation is ready! Please check and approve it.
Looks good; approved.
TypeScript translation is ready! Please check and approve it.
This comment has been hidden.
This comment has been hidden.
For those who stuck on this in java with precision issues u may use BigDecimal with MathContext.DECIMAL128
Thanks! It worked!
It didn't work for me; problem is, the test cases have different result than what the actual formula gives. Am i doing something wrong?
Second function's name should be in snake_case in python.
Duplicate issue.
Sorry, posted it twice on accident.
The second function's name in python should be in snake_case.
fixed
rounding problem in Python
This comment has been hidden.
Just finished in python, seems to have fixed.
rounding problem in Ruby
This comment has been hidden.
This kata still has a rounding error problem in Java. Since the buggy test data hasn't been fixed after such a long time, perhaps it would be better for this kata to be removed altogether.
Just finished in java, seems to have fixed.
Why don't you change
assertEquals
withassertApproxEquals
or the equivalent for the other languages? Leaving it like it is a lot of rounding issues will be arised.I changed assertEquals with assertApproxEquals, but it did not work:
Expected: '31.111111111111114 is above freezing temperature', instead got: '31.11111111111111 is above freezing temperature'
Expected: '28.333333333333336 is above freezing temperature', instead got: '28.333333333333332 is above freezing temperature'
Expected: '-6.111111111111112 is freezing temperature', instead got: '-6.111111111111111 is freezing temperature'
Well, because my suggestion was too literal, being the answer a string that wouldn't work. The 2 parts, the number and the string should be compared separatedly.
it has some rounding errors: Expected: '-12.222222222222223 is freezing temperature', instead got: '-12.222222222222221 is freezing temperature'
Expected: '-12.222222222222223 is freezing temperature', instead got: '-12.222222222222221 is freezing temperature'
Could you post your code and mark your post as having spoiler content?
This comment has been hidden.
please, try putting 5/9 into the brackets
This comment has been hidden.
It's a problem on how you do the celsius conversion, do a product between 2 numbers instead of the grouping you did there.
Ok, thanks for your reply.
This kata is buggy in Java because it depends on implicit formatting of doubles and this can suffer from precision issues. I would recommend one of the following:
This rounding randomness has been pointed out as an issue for years with no change. I recommend dropping this kata.
Just finished in Java.
The rounding error in java is still not fixed...
This comment has been hidden.
Remove the parentheses of the division.
Hi, im working with java to solve this kata, but I can't pass the random test because => "expected<number[x] ...> but was<number[y]>", is this normal?, or is this a issue with random test precision expected results? does anyone could help me, I got stuck with this...
Unfortunately, this isn't normal, but a bug in the way it is being tested.
Maybe it's necessary to round temperature to 2 digits. Nobody measures temperature with 8-10 digits precision.
i agree.
There is a rounding error in Java Script
Just finished in JS.
Same issue in ruby :-( there is a rounding error
What's the value your function returns and what is the expected value? Also, what's the input value?
eg. Testing for 227 Expected: "108.33333333333334 is above freezing temperature", instead got: "108.33333333333333 is above freezing temperature"
Think I fixed it - but a duplicate issue to put it mildly!
It looks like there is a rounding error.
Doesn't work for me. My code in IntelliJ works flawlessly, but when I try to submit the kata I get this error:
'0.0 is above freezing temperature' should equal '10.0 is above freezing temperature' '0.0 is above freezing temperature' should equal '-5.0 is freezing temperature'
This doesn't mean that your code is actually 100% correct.
From what I'm seeing, I can tell you're doing it wrong: your actual temperature doesn't correspond to the expected one. Not an issue with the kata.
Strange, because I when I do the exact same tests in the IDE I get correct results.
No one can help you without seeing your code. Use spoiler tag.
This comment has been hidden.
Typo: celcius and you're doing integer division (Python version is 2.7.6).
In my actual code there is no typo. I made it while typing the code here.
What do you mean by integer division? Why shouldn't I do it?
I am a beginner and I really don't get what's going on...
Read it here
Nice kata.
The same issue here for JS: Expected: '19.444444444444446 is above freezing temperature', instead got: '19.444444444444443 is above freezing temperature' LOL :)
"expected: < 3.888888888888889[] is above freezing t... > but was: < 3.888888888888889[3] is above freezing t... >"
cant solve this kata :(
issue still occurs?
There's the same issue in Python. My code works fine in IDLE.
'0 is above freezing temperature' should equal '10.0 is above freezing temperature'
Same issue here, only works if I force it through the answers.
Python version is 2.7, you're doing integer division. Not a kata issue.
Chrono79: argh, what a stupid catch. thanks for your hint!
ruby
Expected: "-17.77777777777778 is freezing temperature", instead got: "-17.77777777777778 is freezing temperature" Expected: "190.55555555555557 is above freezing temperature", instead got: "190.55555555555557 is above freezing temperature" and another 100 bugs.
umm... cant solve this kata.
The same problem appears in java.
fixed.
This comment has been hidden.
Just finished in java, seems to have fixed.
Java version is impossible to complete:
expected:<13.33333[3333333334] is above freezing t...> but was:...
Just finished in java, seems to have fixed.
This comment has been hidden.
This comment has been hidden.
Not an issue
Thank you for the responses. I've been learning Pythin 3.x so I hadn't run into this before. I guess I'll need to pay more attention to which version of python the kata is available in.
(using python) Always fail in random tests deal to annoying floating problems before, finally figure out how to pass them..
To those who sucked in random tests (and who use python?): Once calculate the celsius according to that formula mentioned, round the result to the 12th bit..(I mean something like round(x,12).) At least it works for me.
Submitted Groovy translation, please check it out.
Approved.
Kata not work for java. expected:<24.44444444444444[3] is above freezing t...> but was:<24.44444444444444[6] is above freezing t...> Failed. Not work.
The java variant is impossible to complete with the kata maker having no clue how fractions work in java.
Try to change order of operations. Worked for me.
This comment has been hidden.
Java: Test suite produces invalid "expected" results. Example: expected:<-3.888888888888889[] is freezing tempera...> but was:<-3.888888888888889[3] is freezing tempera...>
Apparently this is the same issue as has been reported multiple times in the past year and marked resolved, but is not currently functioning correctly.
Just finished in java, seems to have fixed.
This comment has been hidden.
Java: Basically same for me. Can some admin have look into this? Seems like there is an issue with Submit tests. Unfortunate to see it not corrected for such a long time.
I made the modifications (the java version was really a mess!) and republished it, but the previous soluitons aren't invalidated yet... I don't know if this is just the server which is not up to date or if my modifications won't actually get realmy published because there are already too much completions to the kata... Let's see it in the next days...
This comment has been hidden.
This comment has been hidden.
Coding in JavaScript. The test code comparisons are unforgiving, this Kata excercise makes little sense unless there is some level of rounding on the result. My code tests fine on the simple tests but in the extended testing I am getting slight variations due to floating point errors:
Expected: '29.444444444444446 is above freezing temperature', instead got: '29.444444444444443 is above freezing temperature' ✘ Expected: '-12.222222222222223 is freezing temperature', instead got: '-12.222222222222221 is freezing temperature'
How can I fix this since I cannot change the test coding
Yeah, I see the mistake in this line: int c = (int) (temperture - 32 + (5/9.0)); (Java tests)
Still wrong equation in Java test cases.
The equation is wrong. Java
You are right!! java don't passed the test :/
it's a precision/rounding problem
Can someone tell me why float(5/9) is not equal to (5.0/9.0) ? I am using python
5/9
is0
.float(5/9)
is0.0
. You probably want to usefloat(5)/9
. i.e. Convert to float before the division.In java, when you divide 2 numbers with the same type, the result has the same type that the operands have. 5 and 9 are ints, so java converts the result of 5/9 (0.5555555556) to an int using half down rounding, resulting in 0. But, since 5.0 and 9.0 are both floats, the result is also a float by the Java rules, so it does no conversion and the result is 0.555555556.
I am sort of new here and I a beginner when it comes to java. When I use run test, I pass. But when I click submit, I fail all the test cases. Is any one else facing the same issue? How do i resolve it?
the test cases to this problem has rounding/precision errors
Tests @submit do not work with Java.
they are still not working
on ruby:
Testing for 75 Test Passed: Value == "23.88888888888889 is above freezing temperature"
Testing for 39 Expected: "3.8888888888888893 is above freezing temperature", instead got: "3.888888888888889 is above freezing temperature"
You gotta be kidding me right ???
This exact problem occurs in the Ruby version of this Kata. These test cases are unrealistic, in the real world celsius values are generally reported to the nearest tenth.
fixed.
"""Testing for 32 '0.0 is freezing temperature' should equal '0.0 is above freezing temperature'"""
False. Zero is in fact the definition of freezing. To pass tests, I had to return freezing for c < 0, rather than c <= 0, which is the accurate choice.
for JavaScript: "Expected: 13.333333333333334 is above freezing temperature, instead got: 13.333333333333332 is above freezing temperature"
Ruby: Expected: "13.333333333333334 is above freezing temperature", instead got: "13.333333333333332 is above freezing temperature"
I know it's a different language but did you ever solve this issue? I feel kind of cheated by the unrealistic expectation of the kata expecting so many decimal places.
Is it maybe my maths that's the issue?
(temperature - 32) / 1.8
This comment has been hidden.
Thank you for this comment, I was super confused by the results of the test cases in Java
validation on submit is wrong
The test code for Java is utterly wrong!.
see below
Is there anyway to retranslate the java...version
Not a trace of correct formatted output at all... Why would I need to put a decimal after integers and all decimals after floating numbers?
Edit: Keep it simple, use str()!
Just finished in python, seems to have fixed.
The test code for Java is utterly wrong. celsius = (fahrenheit - 32) * (5/9) not (fahrenheit - 32) + (5/9). Also when temp > 0 it is not freezing temperature.
is it fixed yet? - apparently not. :( - i'm raising an another issue.
the translation from Celsius to Farenheit is fixed but the output text about freezing/non-freezing temp is still wrong
i'm still waiting for the fix :)
Yeah it is pretty bad :/
Just had a go and passed.
It's all wrong, the test cases for submit are wrong. Should be something like this.
import java.util.Random; import static org.junit.Assert.assertEquals; import org.junit.Test;
public class PruebasCelsius { String solution(int temperture) { int c = (int) ((temperture - 32) * (5/9.0)); return c + (c <= 0 ? " is freezing temperature" : " is above freezing temperature"); }
}
It seems that hardcoded values in tests are generated in different language than ruby(or on diffrerent platform/ruby version) as there is small difference in floating-point calculation. Shouldn't those tests just check for the difference and if it's small enough assume values are equal?
example:
Testing for 235 Expected: "112.77777777777779 is above freezing temperature", instead got: "112.77777777777777 is above freezing temperature"
I have exactly the same issue.. Did you fix it?
No, I tried BigNum but that didn't help. The only one solution that comes to my mind (besides fixing tests) is to write a function that mimic floats rounding of the original platform/ruby version/language.
The problem was you used the 'incorrect' order of operations to complete this kata ;) Should be fine now though.
This comment has been hidden.
5/9 == 0
in python2. Use5.0/9
instead.Thanks buddy, makes sense cause I'm using and I'm used with Python 3. I don't think codewars uses Python 2. Cheers!
This comment has been hidden.
Firstly you're not returning the string just printing it, Secondly if
c > 0
does not make sense with the statements under them. Hopefully this is enough to guide you through your answer :)'Looks like you've solved it'
JAVA: absolutely wrong kata... formula at the task is right but all the rest :-( impossible to solve it if you know what it is about)) I decided it only after Test-Cases reading
This comment has been hidden.
Ruby: What is the correct expected result for:
There is no explicit test for it but it is occasionally generated by the random tests.
This comment has been hidden.
True! The tests cases are wrong. The formula has mistake
Pass the test cases, but submit fail
It is crazyness all solutions for Java made with mistake))))
Someone seems to have fixed this.
This is really good debugging practice for beginning programmers.
Is one supposed to input a number into the weather function - because i have corrected and reformatted the function to basically works like this: weather_info(convert_to_celsius(number))
My code does produce the correct answer for all the test cases but i put a number inside the convert function and then pass that as an argument for the weather function. Hence why i get the errror: 10.0 10.0 is above freezing temperature Celsius converter should get correct answer '50 is above freezing temperature' should equal '10.0 is above freezing temperature' Is this acceptable?
I think it need test case with 0 degrees. It is curious case because it is melting and freezing point at the same time.
Not all your tests are requiring the same amount of decimals, so we can't pass them all at once.
I'm talking about Python.
I talk about Ruby
Your test don't work again Celsius converter should get correct answer Test Passed: Value == "10.0 is above freezing temperature" Test Passed: Value == "-5.0 is freezing temperature" 2 Passed 0 Failed 0 Errors Process took 62ms to complete
Then I will get Celsius converter should work for fixed tests Expected: "13.333333333333334 is above freezing temperature", instead got: "13.0 is above freezing temperature" Test Passed: Value == "-5.0 is freezing temperature" Expected: "0.5555555555555556 is above freezing temperature", instead got: "0.0 is freezing temperature" Test Passed: Value == "-15.0 is freezing temperature" Expected: "-17.77777777777778 is freezing temperature", instead got: "-18.0 is freezing temperature" 2 Passed 3 Failed 0 Errors Process took 133ms to complete
Not sure about what language you are talking about, but in any case I see no part of the description that tells you to round numbers; if you are referring to either Python or Ruby, please comment under my reply down below, so that I can get notified :)
This comment has been hidden.
Ok, but why should you round values?
But your test check "10.0", not "10" In next step your test expects "13.3333...4"
Why?
Then I will get Celsius converter should work for fixed tests Expected: "13.333333333333334 is above freezing temperature", instead got: "13.0 is above freezing temperature" Test Passed: Value == "-5.0 is freezing temperature" Expected: "0.5555555555555556 is above freezing temperature", instead got: "0.0 is freezing temperature" Test Passed: Value == "-15.0 is freezing temperature" Expected: "-17.77777777777778 is freezing temperature", instead got: "-18.0 is freezing temperature" 2 Passed 3 Failed 0 Errors
I still don't get your problem: why can't you just return full (ie: not rounded) decimals?
Not all your tests are requiring the same amount of decimals, so we can't pass them all at once.
I passed all the test cases, but I dont know why I can't pass when submitting?
test1(GrassHopperTest) expected:<[24 is] freezing temperatur...> but was:<[13 is above] freezing temperatur...> test2(GrassHopperTest) expected:<-[8 is above] freezing temperatur...> but was:<-[5 is] freezing temperatur...> test3(GrassHopperTest) expected:<[1] is freezing tempera...> but was:<[0] is freezing tempera...> test4(GrassHopperTest) expected:<-[26 is above] freezing temperatur...> but was:<-[15 is] freezing temperatur...> test5(GrassHopperTest) expected:<-[23 is above] freezing temperatur...> but was:<-[13 is] freezing temperatur...> 0 Passed 5 Failed 0 Errors Process took 3470ms to complete
Another sweet one for beginners, translated into both Python and Ruby, but please note that there is currently typo in the test descriptions: celCius instead of celSius.
Thanks for your work on this one too :)
Ah good catch.
Thank you for all of your translation work!
Hi Giacomo,
Did you complete the kata in Ruby? I tried both floats and BigDecimal but I still get a calculation error.
Thanks!
Well, I wrote it, so in a way I completed it, yeah.
I am not familiar with the calculation error: can you be more specific :)?
This comment has been hidden.
This comment has been hidden.
fixed.
Do your random tests work? http://screencast.com/t/Vj66X8aPtQ
Actually it was the fixed test that was broken. Fixed now.
Looks better, thank you!
Correcting simple typos won't teach coding - it would only teach how to correct typos. When you put : instead of = in variable assigment, better make some clear code showing what will those operators do and how they differ. Those aren't common mistakes. I can't imagine someone trying to assign variable with : insted of = nor someone returning cleraly named function argument just next line after assigning another clearly named var.
Yeah, it's rather simple task, but try change your attitude: for absolute beginners it may be good point to start analysis of syntax and make common with language concepts, even with using = as assigning variable.
This comment has been hidden.
Nice, but it needs a few more bugs.