state_a = True state_b = False state_c = True def parallel_logic(): print(f'Parallel Logic: A={state_a}, B={state_b}, C={state_c}') if state_a: print('\tDetected State A') if state_b: print('\tDetected state B') if state_c: print('\tDetected state C') def serial_logic(): print(f'Serial Logic: A={state_a}, B={state_b}, C={state_c}') if state_a: print('\tDetected State A') if state_b: print('\tDetected state B') if state_c: print('\tDetected state C') parallel_logic() serial_logic()