Skip to content

Latest commit

 

History

History
40 lines (22 loc) · 562 Bytes

Grasshopper_Basic_Function_Fixer.md

File metadata and controls

40 lines (22 loc) · 562 Bytes

CodeWars Python Solutions


Grasshopper - Basic Function Fixer

Fix the function

I created this function to add five to any number that was passed in to it and return the new value. It doesn't throw any errors but it returns the wrong number.

Can you help me fix the function?


Given Code

def add_five(num):
    total = num + 5
    return num

Solution

def add_five(num):
    total = num + 5
    return total

See on CodeWars.com