214-thinking-logically-elements-of-computational-thinking Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

thinking logically steps

A
  • identifying points in a solution where a decision has to be taken e.g branching, looping
  • determine logical conditions (e.g x>y) that affect the outcome of a decision
  • how those decisions will change the flow of the program by tracing it and test cases
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Good algorithm

A
  • clear and precisely stated steps that produce the correct output for any set of valid inputs
  • invalid inputs rejected
  • must always terminate at some point
    -should execute efficiently in as few steps as possible
  • design makes it so other people would be able to understand it and modify it
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Tools for designing algorithms and thinking logically

A

Hierarchy charts - useful for identifying the major tasks, and breaking these down into sub tasks
Flowcharts- designing algorithm, getting down initial ideas for individual subroutines
Pseudocode- translate easily into program code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Decisions

A

represented by boolean expressions
evaluated in a selection/iteration statement causing code to branch/loop
determine how different parts of the program will be completed/route

important to identify all the decisions that need to be made, to be informed and gather enough info about the options

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Trace table

A

used to write down the contents of each variable as it changes during execution
-useful for figuring how the algorithm works or finding out why it is not working properly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly