I’m trying the following, but it always returns output a = input x, even if a = 0. I am working with integers and the type hint for x is set as such.
if x == 0: a = 1 else: a = x print a
Covering tutorials and posts I also tried a different approach in the attached images, but it is not producing the desired result.
Any help is appreciated!