Save
Upgrade to remove ads
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

CRITICAL POINTS

QuestionAnswer
Subroutines a named sequence of instructions that can be reused in other or the same programs. They are called procedures or functions. They save time.
Opcode instruction
Operand data being acted on
Metadata data about data
Variable declaration the point at which a variable is created, In most language, the data type is declared too
Initialised when a variable is assigned to its first value
name.upper() (python) turns string to upper case
name.lower() (python) turns string to lower case
name.isupper() (python) checks if string is in uppercase
name.islower() (python) checks if string is in lowercase
ord(‘A’) (python) returns ascii value (ASC() in pseudocode)
chr(65) (python) returns character at that ascii value (CHR() in pseudocode)
Intractable problems no known efficient algorithm to solve them
Boolean Precedence NOT - highest priority AND - middle priority OR - lowest priority This is somewhat like BODMAS
Computational Thinking a set of problem-solving methods that express problems and solutions in ways that a computer could execute, it can: - Understood - Formally represented and solved
Algorithmic Thinking Stages 1. Understood the problem 2. Formulate the problem 3. Design an algorithm 4. Implement the algorithm 5. Run the code and solve the original problem
Induction (thinking logically) A hypotheses (idea) is proposed based on observations When developing for a stakeholder, existing programs will be observed
Deduction (thinking logically) Uses underlying rules to determine how a system should work More for mathematical/scientific problems where known rules can be applied
OCR ERL pseudocde used in exams
Variables (OCR ERL) Identifier = value Global identifier = value
Casting (OCR ERL) str() int() float()
Output (OCR ERL) print()
Input (OCR ERL) input()
Iteration - count controlled (OCR ERL) For i = 0 to 7 print(“Hello”) Next i
Iteration - condition controlled (while) (OCR ERL) (may never run at all) While answer != “Computer” Answer = input(“”) Endwhile
Iteration - condition controlled (do until) (OCR ERL) (always runs at least once) Do Answer = input(“) Until answer == “Computer”
Comparison operators (OCR ERL) == != < > <= >=
Arithmetic operators (OCR ERL) + - * / MOD - returns remainder of division DIV - returns whole part of division (always rounds down) ^
Logical operators (OCR ERL) AND OR NOT
String handling (OCR ERL) Get the length: (includes whitespace) Stringname.length Get a substring: (indexing starts at 0) stringname.substring(starting position, no. of characters)
Subroutines (function) (OCR ERL) Function triple(number) Return number * 3 Endfunction
Subroutines (procedure) (OCR ERL) Procedure greeting(name) print(“Hello” + name) Endprocedure
Subroutines (pass by value/reference) (OCR ERL) Procedure name(x:byVal, y:byRef) X is passed by value Y is passed by reference
Arrays (OCR ERL) Array names[3] Names[0] = “A” Names[1] = “B” Names[2] = “C” Print(names[2])
2D array (OCR ERL) Array board[8,8] Board[0,0] = “Rook”
Selection (if/else) (OCR ERL) If entry == “a” then print() Elseif entry == “b” then print() Else print() Endif
Selection (switch/case) (OCR ERL) Switch entry: Case ”A”: print() Case “B”: print() Default: print() Endswitch
Files (Make x the first line of sample.txt) (OCR ERL) myFile = openRead(“sample.txt”) X = myFile.readLine() myFile.close()
Files (End of file) (OCR ERL) endofFile()
Files (Print out contents) (OCR ERL) myFile = openRead(“sample.txt”) While NOT myFile.endofFile() print(myFile.readLine()) Endwhile myFile.close()
Files (Hello world is made the contents of sample.txt (any previous contents are overwritten)) (OCR ERL) myFile = openwrite(“sample.txt”) myFile.writeLine(“Hello world”) myFile.close()
Comments (OCR ERL) Denoted by // //this is a comment Can be after some code or on a new line
Python file handling (opens a file for reading) f = open(“filename”, “r”)
Python file handling (returns a line of code) f.readline() (add .strip() at end to get rid of return character)
Python file handling (closes file) f.close()
Python file handling (to open file to ‘append/add’) f = open(“filename”, “a”)
Python file handling (writes a new line, and also reuters) f.write(variable+’\n’) (\n = return button)
Python file handling (opens a new file/overwrites an existing file (open for writing)) f = open(“filename”, “w”)
Created by: FlashCardFun!
 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards