Skip to the content. Back to Chapter 2
<style> :not(ul) + ol { counter-reset: list-ctr; list-style-type: none; list-style-position: outside; } :not(ul) + ol > li { counter-increment: list-ctr; } :not(ul) + 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 ol { list-style-type: circle; } ul { list-style-type: decimal; } ul ul { list-style-type: lower-alpha; } ul ul ul { list-style-type: lower-roman; }

Chapter 48

  1. str[] items = ['hello world', 'out of cheese; redo from start', 'you sunk my battleship']
    
    search_term = input('enter search term: ')
    
    if (SearchList(items, search_term)) then do
        output('found item')
    else do
        output('could not find item')
    end if
    
  2. The input is a single float n. If the language supports complex numbers, the input is unrestricted; if not, the input must be non-negative. The output is a complex number in languages that support them, and it is a float in languages that do not.

Exercises