Decide zero, or continue (need help)
Hi. I'm new to programming so I apologise if this question is stupid but I've spend about a week on this and I can't figure it out and I feel like my head is going to explode from so much information. But now to the point. I would need the program to decide if the number is zero, and if it is to print a message, and of it's not, then remember the value and keep working with it. Example: x1=int(input()) x2=int(input()) x3=int(input()) c=x1+x2-x3 if c==0: print ("zero") else: a=(x1+x3) /c <- This is basically where the program would decide that c is not zero and calculate the given example, and then save it and work with it later. number=a And then I would need to continue with that number like d=number*x1*x2 I need it to work somehow like that. I've tried all sorts of things but I just don't know anymore. This is probably incredibly stupid what I wrote. But hopefully it shows what I want to do. Thank you all for your help.