Mapa mental
Computing
Contenido del mapa
Computing
my cat says meow. My cat technically doesn't exist, but that's only a technicality. Enjoy the lesson :|
- SECTION 1
- Computational thinking
- Algorithm
- A step by step set of instructions that can be followed to complete a task
- Made by either pseudocode or flowchart
- pseudocode
- Not similar to any individual programming language, but can be easily transferred into any language
- CODE_TO_CHAR and CHAR_TO_CODE convert to and from ascii codes
- flowchart
- Shows the process the program will go through using symbols
- oval=start/end(terminators)
- rectangle=process, step
- diamond=decision
- paralellogram=assignment
- Shows the process the program will go through using symbols
- pseudocode
- Decomposition
- Breaking the problem up into smaller problems that are easier to solve
- Abstraction
- Removing the irrelevant details so that you can focus on the important problem
- Selection
- P
- When there is a choice of paths that could be taken-if statements
- Programming constructs
- Sequencing
- Putting things in the order they are meant to be executed in
- If you're asked for an example of sequencing write two things that happen next to each other
- Putting things in the order they are meant to be executed in
- Iteration
- Assignment
- Making a variable
- Sequencing
- Pattern recognition
- Algorithm
- Searching, sorting and complexity
- Searching
- Binary search
- The list must be in order
- Take the middle value
- If it is what we're looking for, stop
- Else if it is larger than the one we're looking for, take the values to the left of the middle value
- If it is smaller than the one we're looking for, take the values to the right of the middle value
- Repeat with the new list
- If it is smaller than the one we're looking for, take the values to the right of the middle value
- Else if it is larger than the one we're looking for, take the values to the left of the middle value
- If it is what we're looking for, stop
- Take the middle value
- In a list of 2^n, the number of items examined in the worst case is n+1
- e.g. in a list of 16--2^4-- items the maximum number that will be examined is 5--4+1
- The list must be in order
- Linear search
- Look at each element one by one until you find the one you want. Way less efficient than binary search
- Binary search
- Sorting
- MergeSort
- Split all the elements into individual lists
- Merge the lists into lists of two
- Call itself, to merge the lists into lists of 4
- Repeat until merged
- Notes: It is recursive
- Uses a lot of memory to store the sublists
- Quicker than bubblesort
- Uses a lot of memory to store the sublists
- Call itself, to merge the lists into lists of 4
- Merge the lists into lists of two
- Split all the elements into individual lists
- Bubblesort
- Take the first element and the second element from the list
- IF element1>element 2 THEN
- Swap them
- ELSE
- Do nothing
- REPEAT: Move along the list to the next pair
- IF no more elements THEN go to element1
- ELSE: Go to element 2
- UNTIL no changes need to be made
- Note: I don't understand this
- Quite slow
- ELSE: Go to element 2
- IF no more elements THEN go to element1
- REPEAT: Move along the list to the next pair
- Do nothing
- ELSE
- Swap them
- IF element1>element 2 THEN
- Take the first element and the second element from the list
- After the list is sorted, one more pass is needed for the computer to check that it's sorted
- MergeSort
- Complexity
- In the worst case, the number of comparisons needed
- Bubble sort complexity=n^2 where n=length of list
- In the worst case, the number of comparisons needed
- Searching
- Computational thinking
- SECTION 1
·
·
SECTION 2
- variables n stuff
- Data=unprocessed numbers, figures, graph etc
- Information=Data that has been processed and given a meaning
- Data type=how data is stored eg integer
- Constant=A value that stays the same throughout the program
- In pseudocode, you can write them like variables except put them in capital letters
- Used so that you have a variable that never changes
- You can go and assign a new value to a constant, but the computer cannot
- Variable
- A temporary storage device that can later be used by the program
- In python, variables cannot start with numbers
- Variables are case sensitive
- In python, variables cannot start with numbers
- A temporary storage device that can later be used by the program
- Increment=increase by 1
- mod=what is the remainder when you divide one number by the other?
- div=integer division, 17div3=5
- Changing the data type of a variable is called CASTING
- when you put strings together,it is called CONCATINATION
- iteration
- for loop also called count controlled loop
- there is also a while loop (ofc), and a repeat until loop which is not in python and some other languages
- for when you know how many times you want to repeat it
- Pseudocode
- WHILE...ENDWHILE
- fOR...ENDFOR
- REPEAT...UNTIL
- same as while loop except condition is checked at end rather than beginning
- for loop also called count controlled loop
- Arrays
- Holds multiple data values of the same type with one name
- access elements like variable[0],variable[1],etc
- one dimentional and two dimentional arrays- a 2d array is an array of arrays
- Files and Records
- A file is something.txt- a text thingy
- A record is a table.But we don't need to know abouyt them
- Create a txt file. Make it in the same folder as the program is to avoid long thingys.
- Use open() to create a file
- eg. newfile=open("The New File.txt","w")
- newfile, the variable, is called a file handler
- newfile.write("HELLO")
- eg. newfile=open("The New File.txt","w")
- Use open() to create a file
- A file is something.txt- a text thingy
- variables n stuff
yay this is such a colourful mind map !!!
- b
- a
- b
- y
- a
- r
- k
- k
- o
- o
- d
- d
- o
- d
- d
- o
- d
- o
- d
- o
- d
- o
- d
- o
- d
- o
- d
- o
- d
- o
- r
- s
- h
- s
- a
- a
- b
Información
- Descripción
- Mapa Mental sobre Computing, creado por fd fd el 12/09/2019.
- Creado por
- fd fd
- Visitas
- 2
- Valoración
Más sobre Computational Thinking and Algorithms