Skip to content

Latest commit

 

History

History
46 lines (25 loc) · 402 Bytes

Opposite_number.md

File metadata and controls

46 lines (25 loc) · 402 Bytes

CodeWars Python Solutions


Opposite number

Description:

Very simple, given a number, find its opposite.

Examples

1: -1
14: -14
-34: 34

Given Code

def opposite(number):
    pass

Solution

def opposite(number):
    return number * -1

See on CodeWars.com