Name:
Follow the prompts and complete the questions on this document. Be sure to do all 5 parts.
Part 1
What makes two pieces of code “the same”?
If they're copied word by word or if they accomplish the same task. They can also have the same output.
Could there ever be two pieces of code that you consider to be “the same” even if they aren’t identical?
Yes, two pieces of code could output the same answer but in a different way.
Go around the room and write down your answers to these problems (Complete for both partners):
Problems
Eric Kontos birthday is after mine
Aidens bday is in the middle of mine and Mias
Nov 1 and 2 or Feb 14 and Feb 15
Nov 1st Julia and Dylan and Nov 2nd Billy
Part 3
Which problems in Part 2 do you need to do something similar in order to solve them?
Mostly all of them, we needed to compare and contrast everyone's birthday in order to solve them.
Part 4
Decide which of these programs are “the same” as one another.
Be sure to check out Algorithm 6 on the next page
3,4 are the same!
Part 5
Problem: a general description of a task that can (or cannot) be solved with an algorithm
Algorithm: a finite set of instructions that accomplish a task.
There are usually many algorithms to solve the same problem, and many ways to write or express one algorithm including natural language, psuedocode, diagrams, and are implemented using programming code. All algorithms can be created by combining steps in three different ways.
How did today’s activities change the way you think about algorithms and problems?