Try to find out if the given number is even or odd.
if number is even return "Even"
Else return "Odd"
Good challenge! best regards
def even_or_odd(number):
#good luck
import codewars_test as test
# TODO Write tests
import solution # or from solution import example
# test.assert_equals(actual, expected, [optional] message)
@test.describe("Example")
def test_group():
@test.it("test case")
def test_case():
test.assert_equals(even_or_odd(0), "Even", "0 is even")
test.assert_equals(even_or_odd(2), "Even", "2 is even")
test.assert_equals(even_or_odd(3), "Odd", "3 is odd")
test.assert_equals(even_or_odd(24), "Even", "24 is even")
test.assert_equals(even_or_odd(25), "Odd", "25 is odd")
test.assert_equals(even_or_odd(115), "Odd", "115 is odd")
test.assert_equals(even_or_odd(98), "Even", "98 is even")
def hello(): return "Hello word" #p fix the test code
print("Hello", "word") #p fix the cde dumbfuck- def hello():
- return "Hello word" #p fix the test code
import codewars_test as test # TODO Write tests import solution # or from solution import example # test.assert_equals(actual, expected, [optional] message) @test.describe("Example") def test_group(): @test.it("test case") def test_case(): test.assert_equals(hello(),"Hello word")
- import codewars_test as test
- # TODO Write tests
- import solution # or from solution import example
- # test.assert_equals(actual, expected, [optional] message)
- @test.describe("Example")
- def test_group():
- @test.it("test case")
- def test_case():
test.assert_equals(1 + 1, 2)- test.assert_equals(hello(),"Hello word")