General Flashcards
(9 cards)
What is decomposition?
Splitting a large and difficult computing problem into many, smaller individual problems. Benefits: many people can work on the problem at once, makes it easier to comprehend
What is abstraction?
Removing unnecessary detail from a computing problem, so only the important and essential information remains. Benefits: program is simple and more reliable, and created faster.
What does the operator // do?
Divides and rounds down the number.
What does the operator % do?
Gets the remainder after dividing (useful for finding if a number is even or odd).
What does the operator ** do?
It makes the number to the power of the next number (using indices).
What is the difference between == and =?
= assigns a value to a variable.
== compares the two things next to it.
What do the Boolean Operators do?
AND: Program has to have A and B to work
OR: Program has to have either A or B to work
NOT: Program has to not have C to work
What does efficiency in a program mean?
If a program does unecessary work to solve a problem. More efficient programs are not faster, they do less work.
What is the difference between truth & trace tables?
Trace: Follows the steps of an algorithm and records when a variable changes. It helps programmers to find and fix mistakes.
Truth: Made up of boolean operators(AND, OR & NOT) called logic gates. Used to plan a program by listing the inputs and checking what the outputs should be.