Print a string of n alternating +-+-.
Given a nonnegative integer n, return a string of exactly n characters, starting with + and alternating between + and -. Examples: n = 5 returns "+-+-+", and n = 4 returns "+-+-".
def alternating_pattern(n):