This is a follow up question to How to count the number of operations including an 'if... else...' statement?
I do not understand the answer from the poster and will appreciate if someone can clarify.
I have the code with the number of operations:
if (a < b) - 1 operation
print("Hello") - 1 operation
print("World") - 1 operation
else
print("Goodbye") - 1 operation
print("World") - 1 operation
print("Sad") - 1 operation
Case 1 : If a = 5 and b = 6, is the total number of operations 3?
Case 2 : If a = 6, b = 5, is the total number of operations 4?
Or will the total number of operations be 7?
Is it right to say that we only count the number of operations given that the condition fulfill for either 'if' or 'else'?