September 21 lecture notes - Intro Programming w/ Mathematica ------------------------------------------------------------- I) discuss homework / questions 1. Yes, it was too hard. 2. But hey - it's all practice. II) new syntax : 1. Print["The answer is \"" <> ToString[b] <> "\"."]; \" is a quote within a quote ToString[] converts something to a string <> joins strings together. 2. Return[stuff]; use this inside a function to exit and return stuff BUT be careful; it jumps all the way out of Module[{}, If[ ... Return[]; While[... Return[..]]] but *not* all the way out of Module[{}, Do[ ... Return[],{...}] Do[] is apparently special; the Return only jumps out of the Do and not the Module III) 1. Jim's examples in code/ directory * Craps.nb * magic_3x3_square.nb * hangman.nb * fraction_tech_review.nb IV) assignment for this week : more practice