Last active
July 24, 2024 14:37
-
-
Save rafayama/c53526ac3b2bf3326908a608d62a14f9 to your computer and use it in GitHub Desktop.
codewars homework challenges
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Multiply | |
def multiply(a, b): | |
return a * b | |
#Convert num to string | |
def number_to_string(num): | |
return str(num) | |
#Reverse string | |
def solution(str): | |
return str[::-1] | |
#Return negative | |
def make_negative( number ): | |
if number > 0: | |
return -number | |
else: | |
return number |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment