Generation

generate functionFri, 09 Dec 2022

copy the sign of one number to a different one

def cp_sign(a, b): if a < 0: b = -b elif a > 0: b = abs(b) return b cp_sign(-1, 4)

Want to kickstart your project?Use the new AI Studio to create your code