Pular para o conteúdo

Trace, diagnose and repair algorithms

Rastreie na ordem de execução

Valores do registro após a instrução ou iteração nomeada na questão. Transfira valores inalterados adiante. Não pule diretamente para a resposta final: uma tabela de rastreamento registra o caminho percorrido.

A trace follows each pass in order: Count takes 1, 2, 3, 4

Explain your choice of data structure and loop. Identify one boundary case and predict its result. For a subroutine, explain what is returned or changed in the caller.

Salvo para esta sessão neste navegador. Revise isso sozinho ou com seu professor; essas explicações não são marcadas automaticamente.

Revise sua explicação contra estes critérios
  • My types and data structure match the data and the question.
  • I justified the loop and checked its first and last iterations.
  • Initial values and rejected operations preserve the intended state.
  • My test includes input, purpose and expected result.
  • I distinguished returning a value from printing and changing caller state.

Entrar ou criar conta

IGCSE, A-Level & AP