How to avoid “if” chains?
Assuming I have this pseudo-code: bool conditionA = executeStepA(); if (conditionA){ bool conditionB = executeStepB(); if (conditionB){ bool conditionC = executeStepC(); if (conditionC){ … Read more
Assuming I have this pseudo-code: bool conditionA = executeStepA(); if (conditionA){ bool conditionB = executeStepB(); if (conditionB){ bool conditionC = executeStepC(); if (conditionC){ … Read more
Given the following code (that doesn’t work): while True: #snip: print out current state while True: ok = get_input(“Is this ok? (y/n)”) if … Read more