100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Programming Theory Computer Science OCR GCSE As-level A-level (9-1) Computer Science Revision Workbook, ISBN: 9781292131191 £2.99   Add to cart

Interview

Programming Theory Computer Science OCR GCSE As-level A-level (9-1) Computer Science Revision Workbook, ISBN: 9781292131191

 4 views  0 purchase

Notes regarding programming theory for gcses and a level. Detailed explanation of the most important topic for Computer systems. Helps with homework and better exam results. Written by a previous student, so included only the most essential material.

Preview 2 out of 5  pages

  • September 23, 2022
  • 5
  • 2021/2022
  • Interview
  • Unknown
  • Unknown
book image

Book Title:

Author(s):

  • Edition:
  • ISBN:
  • Edition:
All documents for this subject (218)
avatar-seller
raenotes
PROGRAMMING THEORY
UNIT 2


ALGORITHM
- A set of instructions for the computer to do certain tasks


FLOWCHART AND PSEUDOCODE
- Pseudo code is a generic code that is used in program design. A simplified
programming language that anyone can understand.


THE BIG 3 construct

- Sequence → in order
- Selection → e.g. IF statement
- Iteration → e.g. for loop, while loop#

DATA STRUCTURES
Algorithms + Data structures = Programs


- TREE → branches
- LIST → different data types
- GRAPH → nodes, edges

Syntax = rules and grammar of programming language.


VARIABLE AND CONSTANT
Variable = single entity. You can declare it and assign to a value which can change when the
code is running
- Unlike Constant which stays the same (e.g. Pi = 3.14…)

Var name As String = “Win”
- Var is variable and keyword
- Name is identifies
- As String is a data type and keyword
- = is assignment
Every variable you declare should be used. Variables are also memory location. Every
variable is one memory address.
- “...” syntax for STRING
- Win is a value you assign into

, Keywords are reserved words that cannot be used as an identifier.


GLOBAL AND LOCAL VARIABLE

Global = outside the sub routine
A variable that is in memory location which declares outside of the either function or
procedure. It can be called by any subroutine in the program but if the variable name is used
elsewhere, it can cause an error.
- Bad for large programs as it can conflict with other variables.

Local = inside the sub routine
The Main difference is the variables are declared inside the sub routine. So only that
subroutine can use the variable but it's safer and less chance of conflict.


DATA TYPE

STRING: character combinations

CHARACTER: letter symbols, digits, etc

REAL: fractions

INTEGER: whole numbers

BOOLEAN: true or false




OPERATORS
Arithmetic: + - / * ^ % MOD DIV
Comparison: == != >= < > <= <>
Logical: AND OR NOT

Var name As String = “Win”
If name == “Win”
Print (“Welcome” + name)

= assignment statement
== checking the condition

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller raenotes. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for £2.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

77254 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy revision notes and other study material for 14 years now

Start selling
£2.99
  • (0)
  Add to cart