200 likes | 217 Views
CSC 110 – Fluency in Information Technology Chapter 10: Algorithmic Thinking. Dr. Curry Guinn. Today’s Class. Education and Jobs Flow Charting. The First Exam. Friday, October 3 On the preceding Wednesday, I’ll review I’ll tell you everything on the exam Exam covers Chapters 1-11
E N D
CSC 110 – Fluency in Information TechnologyChapter 10: Algorithmic Thinking Dr. Curry Guinn
Today’s Class • Education and Jobs • Flow Charting
The First Exam • Friday, October 3 • On the preceding Wednesday, I’ll review • I’ll tell you everything on the exam • Exam covers Chapters 1-11 • You may bring one 8 ½ X 11 sheet of paper to the exam as a “crutch” • You can put anything on that sheet • Front and back if you want • Tiny font, images, whatever your heart desires
Education Gap • David Brooks NY Times editorial • 28% have college degree • Students in the poorest quarter of the population have an 8.6 chance of getting a college degree. • Students in the top quarter have a 74.9 percent chance. • College graduates earn nearly twice as much as high school graduates,… • People with professional degrees earn nearly twice as much as those with college degrees. • “… divorce rates for college grads are plummeting, …. The divorce rate for high school grads is now twice as high as that of college grads …” • “… High school grads are twice as likely to smoke as college grads. “ • “ …They [high school grads] are much less likely to exercise. “ • “…College grads are nearly twice as likely to vote. They are more than twice as likely to do voluntary work. They are much more likely to give blood. “ • A careful reader may find an uncomfortable bias in the above quote.
Information Gap • The Information Age • Who will control the information? • Who will understand the technology? • Who will be the decision-makers?
Flowcharts • Flowcharts (process graphs) are a common language used in many disciplines. • Flowcharts are a visual representation of an algorithm. • Flowcharts have their own language.
The Language of Flowcharts • We need to represent • Input/Output • Assignment of values to variables • Comparisons (if … else) • Loops
Language of Flowcharts • Input/Output “Input a number” {variable x} “The value is” + x
Language of Flowcharts • Assignment X = 1 X = X + 1 X = Y + 2 * Z
Language of Flowcharts • Comparisons • Comparison operators: <, >, =, <> X < 10 NO YES
Language of Flowcharts • Looping SUM = SUM + X X <> 0 YES NO
Drawing Flowcharts • The RAPTOR software will draw AND execute flowcharts: http://people.uncw.edu/guinnc/courses/Fall08/110/ooc4/raptor_install.exe
Using RAPTOR • An input example • Notice you can save your flowchart in a .rap file • An output example • Adding two numbers • A comparison example • A looping example (Summing numbers input by user)
… And now for the Lab • Download the following file: • http://people.uncw.edu/guinnc/courses/Fall08/110/ooc4/raptor_install.exe • Install it. • Run it.
Flowchart 1 • Create a flowchart to read in two numbers, add them together, and print them out. • Save this flowchart to flowchart1.rap.
Flowchart 2 • Create a flowchart to read in two numbers. • If the first number is bigger, then output “First number is bigger.” • If the second number is bigger, then output “Second number is bigger.” • If they are equal, output “No difference”. • Save your flowchart to flowchart2.rap.
Flowchart 3 • Create a flowchart to read in numbers until the user types 0. • Print out the largest number. • Save to flowchart3.rap.
Out-of-class Assignment 4 • Using RAPTOR (http://people.uncw.edu/guinnc/courses/Fall08/110/ooc4/raptor_install.exe) • Create a flowchart that reads in a series of numbers from the user until the user enters 0. The flowchart should output the average of the numbers. • Due 10/01, 11:59pm
Wrap-up • Homework • Out-of-class Assignment 4: A flowchart • Due 10/01, Midnight