Appendix 5d (OCR A-Level Computer Science): Flashcards

📚Flashcards
Languages and Boolean Logic Guide
Sign up to keep revising.Create a free account to study more flashcards and track your progress.

Practise the cards

15 cards from this deck

Show

Operator for variable assignment

=

Keyword to declare a global variable

global

Functions to cast to string, integer, and float

str(), int(), float()

Number of iterations: for i = 0 to 7

8 times (0-7 inclusive)

What MOD operator returns

Remainder after division

What DIV operator returns

Quotient (whole number from division)

Three logical operators

AND, OR, NOT

Operator to check equality

==

Get length of a string

stringname.length

Extract part of a string

stringname.substring(startingPosition, numberOfCharacters)

Starting index position for strings

0

Starting index for arrays

0

Key difference: function vs procedure

Function returns a value, procedure doesn't

Methods to read from a file

openRead(), readLine(), close()

Symbol for comments

//

Explore OCR A-Level Computer Science Revision Notes by Topics

Explore OCR A-Level Computer Science Model Answers by Topics

Explore OCR A-Level Computer Science Quizzes by Topics

Explore OCR A-Level Computer Science Exam Questions by Topics

Join 100,000+ A-Level students studying Flashcards with us.

Select your subjects, and get access to A+ resources today.