5 lines
240 B
Python
5 lines
240 B
Python
|
def split_number(n):
|
||
|
first_split = n // 2 # this will split the number in two equal parts, if it is even
|
||
|
second_split = n % 2 + first_split # this will add one to one part if the number is odd
|
||
|
return first_split, second_split
|