Skip to content

Latest commit

 

History

History
33 lines (18 loc) · 460 Bytes

Incorrect_division_method.md

File metadata and controls

33 lines (18 loc) · 460 Bytes

CodeWars Python Solutions


Incorrect division method

This method, which is supposed to return the result of dividing its first argument by its second, isn't always returning correct values. Fix it.


Given Code

def divide_numbers(x,y):
    return x / y

Solution 1

def divide_numbers(x,y):
    return x / float(y)

See on CodeWars.com