Skip to the content. Back to Paper 2
<style> ol { counter-reset: list-ctr; list-style-type: none; list-style-position: outside; } ol>li { counter-increment: list-ctr; } ol>li::before { content:"Q" counter(list-ctr) ". "; margin-left: -25px; } ol ul { list-style-type: lower-alpha; } ol ul ul { list-style-type: lower-roman; } ul { list-style-type: decimal; } ul ul { list-style-type: lower-alpha; } ul ul ul { list-style-type: lower-roman; }

Chapter 61

  1. In python:

    array[index_1], arrray[index_2] = array[index_2], array[index_1]
    

    In general:

    >SET tmp TO array[index_1]
    SET array[index_1] TO array[index_2]
    SET array[index_2] TO tmp
    
      • Ahmed
      • George Jane Ahmed Miranda Sophie Bernie Keith (final for this pass = Ahmed George Jane Miranda Sophie Bernie Keith)
      • Bernie
      • Ahmed George Jane Miranda Bernie Sophie Keith (final for this pass = Ahmed Bernie George Jane Miranda Sophie Keith)

Exercises

Chapter 62

  1. b. [54] and [36]

  2.  5 3 9 4 2 6 1
     5 3 9|4 2 6 1
     5|3 9|4 2|6 1
     5|3|9|4|2|6|1
     5|3 9|2 4|1 6
     3 5 9|1 2 4 6
     1 2 3 4 5 6 9
    

Exercises