March R. Smith - University of St Thomas - Minnesota Today’s Class Classroom ChangeClassroom Change Flow ChartsFlow Charts For LoopsFor Loops Light Bulb LabLight Bulb Lab
March R. Smith - University of St Thomas - Minnesota Classroom Change On Thursday we will be in OSS 329 downstairsOn Thursday we will be in OSS 329 downstairs Class topic: evolution of modern computingClass topic: evolution of modern computing
March R. Smith - University of St Thomas - Minnesota Flow Charts Reflects what the computer doesReflects what the computer does In the order the computer does thingsIn the order the computer does things Graphical instead of textualGraphical instead of textual
March R. Smith - University of St Thomas - Minnesota Ovals mark the start and the endOvals mark the start and the end Boxes indicate computer instructionsBoxes indicate computer instructions Statements take placeStatements take place IN ORDERIN ORDER One after AnotherOne after Another Start int X = 0; scanf(“%i”, &X); printf(“%i\n”, X); End A sample flow chart
March R. Smith - University of St Thomas - Minnesota Let’s do a sample flow chart Use c0131avg but we’ll simplify it a bitUse c0131avg but we’ll simplify it a bit Let’s also hand-execute itLet’s also hand-execute it
March R. Smith - University of St Thomas - Minnesota Flow Charts and Looping You draw a loop to show repetitionYou draw a loop to show repetition The diamond marks a condition being checkedThe diamond marks a condition being checked You need to test to decide if the loop continues or notYou need to test to decide if the loop continues or not int X = 0; X++ End X < 3? NO YES
March R. Smith - University of St Thomas - Minnesota c0131avg with a Loop We just re-jigger the individual stepsWe just re-jigger the individual steps
March R. Smith - University of St Thomas - Minnesota Light Bulb Lab What’s the difference in light used by incandescent and fluorescent bulbs?What’s the difference in light used by incandescent and fluorescent bulbs? Let’s do a table with the following:Let’s do a table with the following: –# 60-watt Light bulbs –Watts incandescent –Watts fluorescent US electrical consumption:US electrical consumption: –3.8 Billion Megawatts (3.8 * 10^15) (in 2006) –940.5 KwH per household, just for lighting (in 1995) –What type of table might illustrate this data?
March R. Smith - University of St Thomas - Minnesota Creative Commons License This work is licensed under the Creative Commons Attribution-Share Alike 3.0 United States License. To view a copy of this license, visit sa/3.0/us/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.