Open the App

Subjects

Computer ScienceComputer Science491 views·Updated Jun 15, 2026·6 pages

Learn Effective Pseudocode Writing

Pseudocode is your stepping stone to proper programming - it's...

1
of 6
Pseudocode notes

Variables

assigned using =

• name = "Bob"

variables declared within a function are local to that function

variables de

Variables and Data Types

Getting comfortable with variables is absolutely crucial - they're basically containers that store information your program needs to remember. You create them using the equals sign, like name = "Bob", and it's that simple.

Here's something important to remember: variables created inside a function stay local to that function (they can't be used elsewhere). However, if you want to make a variable from your main program local to a specific function, just use the local keyword, or make it available everywhere with global.

Casting lets you convert between different data types, which you'll use constantly. The functions str(), int(), and float() are your best mates here - str(3) gives you "3", whilst int("3") gives you the number 3.

Quick Tip: Think of casting like translation - you're converting data from one "language" (type) to another so different parts of your program can understand it.

2
of 6
Pseudocode notes

Variables

assigned using =

• name = "Bob"

variables declared within a function are local to that function

variables de

Input, Output and Loops

The print command is your window to the world - it displays whatever you want on screen. You can print text directly with print("hello") or show what's stored in a variable by printing the variable itself.

Count controlled iteration (for loops) runs a specific number of times. The example for i=0 to 7 actually runs 8 times because it includes both 0 and 7 - this catches loads of students out in exams!

Condition controlled iteration keeps going until something changes. While loops check the condition first, then run the code. Do-until loops run the code first, then check - this guarantees the code runs at least once, which is sometimes exactly what you need.

Remember: Count when you know how many times, condition when you're waiting for something to happen!

3
of 6
Pseudocode notes

Variables

assigned using =

• name = "Bob"

variables declared within a function are local to that function

variables de

Decision Making and Text Handling

If-else statements are like having a conversation with your program - you're giving it different responses based on what the user does. The structure flows from if to elseif (for additional conditions) to else thecatchallbackupthe catch-all backup.

Switch-case statements do the same job but look much cleaner when you've got loads of options to check. They're brilliant for menu systems where users might choose A, B, C, or something completely random.

String handling gives you superpowers with text. Use .length to find out how long a string is, and .substring() to grab specific chunks of text. The substring method needs two numbers: where to start and how many characters to take.

Pro Tip: Switch statements are your friend for multiple choices - they're much easier to read than endless if-elseif chains!

4
of 6
Pseudocode notes

Variables

assigned using =

• name = "Bob"

variables declared within a function are local to that function

variables de

Subroutines and Arrays

Functions and procedures are like having helpful assistants in your code. Functions do a job and give you something back (using return), whilst procedures just do a job without returning anything. Think of functions as questions that need answers, procedures as commands that just get done.

Arrays are incredibly useful for storing lists of related data. They start counting from 0 (not 1!), so your first item is always at position 0. Declare them with the array keyword and a size, then fill them up with your data.

File handling lets your programs remember things between runs. Use openRead() to get information from files and readLine() to grab it line by line. Don't forget to close() your files when you're finished - it's like putting the lid back on a jar.

Key Point: Always remember arrays start at 0 - this trips up even experienced programmers sometimes!

5
of 6
Pseudocode notes

Variables

assigned using =

• name = "Bob"

variables declared within a function are local to that function

variables de

File Operations and OOP Basics

Writing to files works similarly to reading, but you use openWrite() and writeLine() instead. This is brilliant for saving user data, high scores, or any information your program needs to remember for next time.

Object-oriented programming introduces methods (what objects can do) and attributes (what objects know about themselves). Everything is public (accessible everywhere) unless you specifically make it private with the private keyword.

Constructors are special procedures called new that set up your objects when they're first created. They're like the instruction manual that gets your object ready to use - setting initial values and getting everything organised.

Remember: Think of private attributes like your diary - only you (the object) should be able to read and change them directly!

6
of 6
Pseudocode notes

Variables

assigned using =

• name = "Bob"

variables declared within a function are local to that function

variables de

Classes and Inheritance

Classes are like blueprints for creating objects. The Pet class example shows how you define what all pets should have (a name) and what they can do (be created with a given name through the constructor).

Inheritance is absolutely brilliant - it lets you create new classes based on existing ones without starting from scratch. The Dog class inherits everything from Pet, then adds its own special features (like breed).

The super.new() call is clever - it runs the parent class's constructor first, then adds the new stuff. This means Dog objects get both a name (from Pet) and a breed (from Dog) without duplicating code.

Think of it this way: If Pet is like a general animal template, Dog is a more specific version that keeps all the pet features but adds dog-specific ones!

We thought you’d never ask...

What is the Knowunity AI companion?

Our AI Companion is a student-focused AI tool that offers more than just answers. Built on millions of Knowunity resources, it provides relevant information, personalised study plans, quizzes, and content directly in the chat, adapting to your individual learning journey.

Where can I download the Knowunity app?

You can download the app from Google Play Store and Apple App Store.

Is Knowunity really free of charge?

That's right! Enjoy free access to study content, connect with fellow students, and get instant help – all at your fingertips.

Most popular content: Pseudocode

2

Most popular content in Computer Science

9
Computer ScienceComputer Science

GCSE Computer Science Overview

Comprehensive study material for OCR GCSE Computer Science covering key topics such as computer architecture, network security, programming techniques, and ethical considerations. Ideal for exam preparation, this resource includes essential concepts, exam questions, and definitions to enhance understanding and retention.

97,876304
C
Computer ScienceComputer Science

Computer Science quiz

Purpose, Components and functions of CPU. Also von neuman architecture

106384
Computer ScienceComputer Science

GCSE Computer Science Revision

Comprehensive revision notes for OCR GCSE Computer Science Component 1 (J277). Covers key topics including networking, cybersecurity, data compression, computer architecture, and ethical issues. Ideal for exam preparation and understanding core concepts. Access original slides for further details.

104,827150
Computer ScienceComputer Science

GCSE Computer Science // Revision Notes

Concise revision notes for the GCSE OCR computer science specification (J277). Contains all the info needed for paper 1. Paper 2 is in my bio.

104666
C
Computer ScienceComputer Science

computing quiz for

good luck

101250
C
Computer ScienceComputer Science

computer science,geography

this will help you revise for when you are next tested on these questions this will also help you to remember

71941
Computer ScienceComputer Science

GCSE Computer Science Algorithms

Comprehensive overview of algorithms for AQA GCSE Computer Science Paper 1, covering key concepts such as sorting (Bubble Sort, Merge Sort), searching (Linear and Binary Search), and essential programming principles like data types, pseudocode, and flowcharts. Ideal for exam preparation and understanding algorithm efficiency.

1075656
C
Computer ScienceComputer Science

cs ocr

Level up your computer science knowledge with this comprehensive flashcard set designed for grade 11 students. Dive deep into complex concepts and ace your exams!

115260
Computer ScienceComputer Science

AQA GCSE Computer Science Overview

Comprehensive revision notes covering the AQA GCSE Computer Science curriculum, including key topics such as computer memory, cybersecurity, programming concepts, network protocols, and data representation. Ideal for exam preparation and understanding core concepts in computing.

105,360216

Most popular content

9
SociologySociology

Sociology of Education Overview

Explore comprehensive A-Level Sociology notes on the education system, covering key theories, policies, and sociological perspectives. This resource includes insights on marketisation, gender roles, cultural deprivation, and educational inequalities, providing a thorough understanding of how education shapes social stratification and individual achievement. Ideal for exam preparation and in-depth study.

12102,8383,040
SociologySociology

Sociology of Families: Comprehensive Revision

Dive into an extensive overview of family dynamics, perspectives, and patterns in sociology. This resource covers key concepts such as family diversity, gender roles, marriage, and the impact of social policies on family structures. Perfect for A-Level Sociology students preparing for Paper 2.

1273,6372,306
CriminologyCriminology

Criminology: Crime & Punishment Overview

Comprehensive mindmaps covering key concepts in the Crime and Punishment topic for WJEC Criminology Unit 4. This resource includes detailed insights into the Criminal Justice System, crime prevention strategies, sentencing models, and the roles of various agencies. Ideal for A-Level revision, ensuring you grasp essential theories and legislative processes to excel in your exams.

1254,8591,059
SociologySociology

Comprehensive Crime & Deviance Overview

Explore an extensive revision of crime and deviance topics, including theories, types of crime, and the impact of media. This resource covers key concepts such as Marxism, functionalism, gender and crime, and the influence of globalization on criminal behavior. Ideal for students seeking a thorough understanding of criminology and its various theories. Type: Full Topic Revision.

1251,6461,399
C
BiologyBiology

Cell Biology and Cell structure

cell structures

93,2200
English LiteratureEnglish Literature

An Inspector Calls: Character Insights

Explore in-depth analysis and key quotes for characters in J.B. Priestley's 'An Inspector Calls'. This resource covers Gerald Croft, Inspector Goole, Sheila Birling, Mrs. Birling, Eric Birling, and Eva Smith, focusing on themes of class, gender roles, and social responsibility. Ideal for students aiming for Grade 8 and above.

1125,419907
CriminologyCriminology

WJEC Unit 4 Criminology

Criminology unit 4 detailed revision note

127,146125
CriminologyCriminology

Criminology Theories Overview

Explore key criminology theories and their implications on crime and deviance. This comprehensive summary covers biological, psychological, and sociological perspectives, including labelling theory, right realism, and the impact of social campaigns on policy development. Ideal for A-Level criminology students seeking to understand the complexities of criminal behaviour and the factors influencing crime prevention strategies.

129,757210
English LiteratureEnglish Literature

Romeo and Juliet: Key themes

Key Romeo and Juliet themes and analysed quotes

106,700198

Can't find what you're looking for? Explore other subjects.

Students love us — and so will you.

4.6/5App Store
4.7/5Google Play

The app is very easy to use and well designed. I have found everything I was looking for so far and have been able to learn a lot from the presentations! I will definitely use the app for a class assignment! And of course it also helps a lot as an inspiration.

Stefan SiOS user

This app is really great. There are so many study notes and help [...]. My problem subject is French, for example, and the app has so many options for help. Thanks to this app, I have improved my French. I would recommend it to anyone.

Samantha KlichAndroid user

Wow, I am really amazed. I just tried the app because I've seen it advertised many times and was absolutely stunned. This app is THE HELP you want for school and above all, it offers so many things, such as workouts and fact sheets, which have been VERY helpful to me personally.

AnnaiOS user

Computer ScienceComputer Science491 views·Updated Jun 15, 2026·6 pages

Learn Effective Pseudocode Writing

Pseudocode is your stepping stone to proper programming - it's like writing instructions in plain English before converting them into actual code. These notes cover all the essential building blocks you'll need for your programming coursework, from basic variables to...

1
of 6
Pseudocode notes

Variables

assigned using =

• name = "Bob"

variables declared within a function are local to that function

variables de

Sign up to see the content. It's free!

  • Access to all documents
  • Improve your grades
  • Join milions of students

Variables and Data Types

Getting comfortable with variables is absolutely crucial - they're basically containers that store information your program needs to remember. You create them using the equals sign, like name = "Bob", and it's that simple.

Here's something important to remember: variables created inside a function stay local to that function (they can't be used elsewhere). However, if you want to make a variable from your main program local to a specific function, just use the local keyword, or make it available everywhere with global.

Casting lets you convert between different data types, which you'll use constantly. The functions str(), int(), and float() are your best mates here - str(3) gives you "3", whilst int("3") gives you the number 3.

Quick Tip: Think of casting like translation - you're converting data from one "language" (type) to another so different parts of your program can understand it.

2
of 6
Pseudocode notes

Variables

assigned using =

• name = "Bob"

variables declared within a function are local to that function

variables de

Sign up to see the content. It's free!

  • Access to all documents
  • Improve your grades
  • Join milions of students

Input, Output and Loops

The print command is your window to the world - it displays whatever you want on screen. You can print text directly with print("hello") or show what's stored in a variable by printing the variable itself.

Count controlled iteration (for loops) runs a specific number of times. The example for i=0 to 7 actually runs 8 times because it includes both 0 and 7 - this catches loads of students out in exams!

Condition controlled iteration keeps going until something changes. While loops check the condition first, then run the code. Do-until loops run the code first, then check - this guarantees the code runs at least once, which is sometimes exactly what you need.

Remember: Count when you know how many times, condition when you're waiting for something to happen!

3
of 6
Pseudocode notes

Variables

assigned using =

• name = "Bob"

variables declared within a function are local to that function

variables de

Sign up to see the content. It's free!

  • Access to all documents
  • Improve your grades
  • Join milions of students

Decision Making and Text Handling

If-else statements are like having a conversation with your program - you're giving it different responses based on what the user does. The structure flows from if to elseif (for additional conditions) to else thecatchallbackupthe catch-all backup.

Switch-case statements do the same job but look much cleaner when you've got loads of options to check. They're brilliant for menu systems where users might choose A, B, C, or something completely random.

String handling gives you superpowers with text. Use .length to find out how long a string is, and .substring() to grab specific chunks of text. The substring method needs two numbers: where to start and how many characters to take.

Pro Tip: Switch statements are your friend for multiple choices - they're much easier to read than endless if-elseif chains!

4
of 6
Pseudocode notes

Variables

assigned using =

• name = "Bob"

variables declared within a function are local to that function

variables de

Sign up to see the content. It's free!

  • Access to all documents
  • Improve your grades
  • Join milions of students

Subroutines and Arrays

Functions and procedures are like having helpful assistants in your code. Functions do a job and give you something back (using return), whilst procedures just do a job without returning anything. Think of functions as questions that need answers, procedures as commands that just get done.

Arrays are incredibly useful for storing lists of related data. They start counting from 0 (not 1!), so your first item is always at position 0. Declare them with the array keyword and a size, then fill them up with your data.

File handling lets your programs remember things between runs. Use openRead() to get information from files and readLine() to grab it line by line. Don't forget to close() your files when you're finished - it's like putting the lid back on a jar.

Key Point: Always remember arrays start at 0 - this trips up even experienced programmers sometimes!

5
of 6
Pseudocode notes

Variables

assigned using =

• name = "Bob"

variables declared within a function are local to that function

variables de

Sign up to see the content. It's free!

  • Access to all documents
  • Improve your grades
  • Join milions of students

File Operations and OOP Basics

Writing to files works similarly to reading, but you use openWrite() and writeLine() instead. This is brilliant for saving user data, high scores, or any information your program needs to remember for next time.

Object-oriented programming introduces methods (what objects can do) and attributes (what objects know about themselves). Everything is public (accessible everywhere) unless you specifically make it private with the private keyword.

Constructors are special procedures called new that set up your objects when they're first created. They're like the instruction manual that gets your object ready to use - setting initial values and getting everything organised.

Remember: Think of private attributes like your diary - only you (the object) should be able to read and change them directly!

6
of 6
Pseudocode notes

Variables

assigned using =

• name = "Bob"

variables declared within a function are local to that function

variables de

Sign up to see the content. It's free!

  • Access to all documents
  • Improve your grades
  • Join milions of students

Classes and Inheritance

Classes are like blueprints for creating objects. The Pet class example shows how you define what all pets should have (a name) and what they can do (be created with a given name through the constructor).

Inheritance is absolutely brilliant - it lets you create new classes based on existing ones without starting from scratch. The Dog class inherits everything from Pet, then adds its own special features (like breed).

The super.new() call is clever - it runs the parent class's constructor first, then adds the new stuff. This means Dog objects get both a name (from Pet) and a breed (from Dog) without duplicating code.

Think of it this way: If Pet is like a general animal template, Dog is a more specific version that keeps all the pet features but adds dog-specific ones!

We thought you’d never ask...

What is the Knowunity AI companion?

Our AI Companion is a student-focused AI tool that offers more than just answers. Built on millions of Knowunity resources, it provides relevant information, personalised study plans, quizzes, and content directly in the chat, adapting to your individual learning journey.

Where can I download the Knowunity app?

You can download the app from Google Play Store and Apple App Store.

Is Knowunity really free of charge?

That's right! Enjoy free access to study content, connect with fellow students, and get instant help – all at your fingertips.

Most popular content: Pseudocode

2

Most popular content in Computer Science

9
Computer ScienceComputer Science

GCSE Computer Science Overview

Comprehensive study material for OCR GCSE Computer Science covering key topics such as computer architecture, network security, programming techniques, and ethical considerations. Ideal for exam preparation, this resource includes essential concepts, exam questions, and definitions to enhance understanding and retention.

97,876304
C
Computer ScienceComputer Science

Computer Science quiz

Purpose, Components and functions of CPU. Also von neuman architecture

106384
Computer ScienceComputer Science

GCSE Computer Science Revision

Comprehensive revision notes for OCR GCSE Computer Science Component 1 (J277). Covers key topics including networking, cybersecurity, data compression, computer architecture, and ethical issues. Ideal for exam preparation and understanding core concepts. Access original slides for further details.

104,827150
Computer ScienceComputer Science

GCSE Computer Science // Revision Notes

Concise revision notes for the GCSE OCR computer science specification (J277). Contains all the info needed for paper 1. Paper 2 is in my bio.

104666
C
Computer ScienceComputer Science

computing quiz for

good luck

101250
C
Computer ScienceComputer Science

computer science,geography

this will help you revise for when you are next tested on these questions this will also help you to remember

71941
Computer ScienceComputer Science

GCSE Computer Science Algorithms

Comprehensive overview of algorithms for AQA GCSE Computer Science Paper 1, covering key concepts such as sorting (Bubble Sort, Merge Sort), searching (Linear and Binary Search), and essential programming principles like data types, pseudocode, and flowcharts. Ideal for exam preparation and understanding algorithm efficiency.

1075656
C
Computer ScienceComputer Science

cs ocr

Level up your computer science knowledge with this comprehensive flashcard set designed for grade 11 students. Dive deep into complex concepts and ace your exams!

115260
Computer ScienceComputer Science

AQA GCSE Computer Science Overview

Comprehensive revision notes covering the AQA GCSE Computer Science curriculum, including key topics such as computer memory, cybersecurity, programming concepts, network protocols, and data representation. Ideal for exam preparation and understanding core concepts in computing.

105,360216

Most popular content

9
SociologySociology

Sociology of Education Overview

Explore comprehensive A-Level Sociology notes on the education system, covering key theories, policies, and sociological perspectives. This resource includes insights on marketisation, gender roles, cultural deprivation, and educational inequalities, providing a thorough understanding of how education shapes social stratification and individual achievement. Ideal for exam preparation and in-depth study.

12102,8383,040
SociologySociology

Sociology of Families: Comprehensive Revision

Dive into an extensive overview of family dynamics, perspectives, and patterns in sociology. This resource covers key concepts such as family diversity, gender roles, marriage, and the impact of social policies on family structures. Perfect for A-Level Sociology students preparing for Paper 2.

1273,6372,306
CriminologyCriminology

Criminology: Crime & Punishment Overview

Comprehensive mindmaps covering key concepts in the Crime and Punishment topic for WJEC Criminology Unit 4. This resource includes detailed insights into the Criminal Justice System, crime prevention strategies, sentencing models, and the roles of various agencies. Ideal for A-Level revision, ensuring you grasp essential theories and legislative processes to excel in your exams.

1254,8591,059
SociologySociology

Comprehensive Crime & Deviance Overview

Explore an extensive revision of crime and deviance topics, including theories, types of crime, and the impact of media. This resource covers key concepts such as Marxism, functionalism, gender and crime, and the influence of globalization on criminal behavior. Ideal for students seeking a thorough understanding of criminology and its various theories. Type: Full Topic Revision.

1251,6461,399
C
BiologyBiology

Cell Biology and Cell structure

cell structures

93,2200
English LiteratureEnglish Literature

An Inspector Calls: Character Insights

Explore in-depth analysis and key quotes for characters in J.B. Priestley's 'An Inspector Calls'. This resource covers Gerald Croft, Inspector Goole, Sheila Birling, Mrs. Birling, Eric Birling, and Eva Smith, focusing on themes of class, gender roles, and social responsibility. Ideal for students aiming for Grade 8 and above.

1125,419907
CriminologyCriminology

WJEC Unit 4 Criminology

Criminology unit 4 detailed revision note

127,146125
CriminologyCriminology

Criminology Theories Overview

Explore key criminology theories and their implications on crime and deviance. This comprehensive summary covers biological, psychological, and sociological perspectives, including labelling theory, right realism, and the impact of social campaigns on policy development. Ideal for A-Level criminology students seeking to understand the complexities of criminal behaviour and the factors influencing crime prevention strategies.

129,757210
English LiteratureEnglish Literature

Romeo and Juliet: Key themes

Key Romeo and Juliet themes and analysed quotes

106,700198

Can't find what you're looking for? Explore other subjects.

Students love us — and so will you.

4.6/5App Store
4.7/5Google Play

The app is very easy to use and well designed. I have found everything I was looking for so far and have been able to learn a lot from the presentations! I will definitely use the app for a class assignment! And of course it also helps a lot as an inspiration.

Stefan SiOS user

This app is really great. There are so many study notes and help [...]. My problem subject is French, for example, and the app has so many options for help. Thanks to this app, I have improved my French. I would recommend it to anyone.

Samantha KlichAndroid user

Wow, I am really amazed. I just tried the app because I've seen it advertised many times and was absolutely stunned. This app is THE HELP you want for school and above all, it offers so many things, such as workouts and fact sheets, which have been VERY helpful to me personally.

AnnaiOS user