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.
This was a tough nut to crack, but very satisfying to complete.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Thank you again for your advice about reccursion, after taking a break I did some research which helped me understand where I went wrong and how to break out of the loop I created
Why do you say thet the recursive function is incomplete?
edit: Okay, thank you for the help, it has been very informative, I was completely lost before
This comment is hidden because it contains spoiler information about the solution
Thats what I don't understand, how can the print statement be in the correct location, but when I replace it for a return statement that is not in the correct place. I didn't make this post to say that anything was wrong with the code, but to ask for help from more experienced programmers, because the code works when tested in visualcodestudio
As I said when I use return it shows the following:
Test Results:
thirt
Basic tests
None should equal 79
None should equal 31
None should equal 57
None should equal 71
None should equal 30
I changed it from return to print to see where where the error was occuring, but as I said, when I return the value it shows None instead of the values that would be printed and I do not understand why this is happeneing
This comment is hidden because it contains spoiler information about the solution
I have written a code that works in my IDE and prints out the correct values when I choose to print the values, as seen in my image, but when I return the values, it says None and errors out.
Basic tests
Log
79
None should equal 79
Log
31
None should equal 31
Log
57
None should equal 57
Log
71
None should equal 71
Log
30
None should equal 30
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Or is the approach I have taken to solve the problem wrong?
okay, but I use in-built mathematical functions and it still errors at e-12 or e-14, is there a way to solve this in python which would be able to complete all the problems efficiently whilst avoiding errors at e-14? or to add some leniency to the result parameters?
Loading more items...