I am trying to get my script to print "ERROR" if a = 0. When running the script below, if I enter a as 0 I do get the message "error" but it also executes the rest of the script.
How can I get the script to only print "ERROR" if my condition is satisfied?
def print_num(a, b, c):
if a == 0:
print('ERROR')
print(a, b, c)
elsefor the rest of your function or simplyreturnafter printing the error message.