added ch2_examp7 from reading

the Try It Out examples from our reading.