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.
Because it's not necesary. "bool" is already a boolean, which means it can only have 2 possible values; true or false. The ternary operator (and the if statement) will validate if a value is "true" and only then execute the code.
This comment is hidden because it contains spoiler information about the solution
I feel like random tests are kind of unnecessary in this kata. When you're only testing for two possible values anyway, the fixed tests seem like enough. I haven't created a kata myself before, though, so I'm not sure if the random tests are required. Otherwise, good job! This was a good warm-up :)
Your condition is wrong.
=
is used for assignments, not comparisons.This comment is hidden because it contains spoiler information about the solution
are you returning the result?
Why can't I use a simple if statement???
https://softwareengineering.stackexchange.com/questions/136908/why-use-boolean-variable-over-boolean-variable-false
This comment is hidden because it contains spoiler information about the solution
Great!
Thank you so much!
Your code is fundamentally flawed. It seems like maybe you should go look up how functions work in python.
This
if
condition will always be true. That is, yourelse
block will never run, because yourif
statement can never be false.Thank you so much for your insight! I understand what you said but whenever I change the return to "No", it still gives me the same error message. My brain hurts.
It means your code returned "Yes", but it should have returned "No"
I'm a newborn baby in this world and I cannot, for the life of me, understand how 'Yes' should equal 'No'
Someone please help! I c/p'ed my test results below.
Test Results:
Fixed Tests
Basic Test Cases
Test Passed
'Yes' should equal 'No'
Loading more items...