The Student Room Group

GCSE computer science 17th may exam

Can someone explain to me loops in pseudocode i find it really hard to add loops and if anyone has any predictions/recommendations for paper 2 computer science on 17th Thursday please feel free :3

Scroll to see replies

Most likely to be a whole lot of algorithms, probably some SQL in terms of big markers
A loop uses counts; now there are iterative, count and variable loops. In the exam any can come up.

An iterative loop uses variables - which contains values as a parameter; take the variable for example and iterate through X to the variable i.e X = 10 [FOR i in X (do this) else terminate. It is quite simple once you think about it as the program just looks at every value and compares its value using the parameter. Make you understand that iteration is NOT the same as sequencing
(edited 5 years ago)
Paper 2 is more about the ethical part... legal issues,... networks, computer systems, cyber security, environmental impact...hexadecimal I think... that stuff... with I think assumed knowledge of the first chapters... it is not focused on algorithms though...
Original post by jakelpbooth
Most likely to be a whole lot of algorithms, probably some SQL in terms of big markers


No... They are not called "algorithms" it is simply programming. An algorithm by its very meaning is a set of instructions with specific functions. Whereas programming is used as being generic.

It is like comparing a variable to a value... They are NOT the same.
Reply 5
Original post by qali23
Paper 2 is more about the ethical part... legal issues,... networks, computer systems, cyber security, environmental impact...hexadecimal I think... that stuff... with I think assumed knowledge of the first chapters... it is not focused on algorithms though...


Paper 2 is literally algorithm based questions. It also includes binary addition, and binary/denary/hex conversions. There's a select few other things too. Everything you just listed is in paper 1.
Original post by inox
Paper 2 is literally algorithm based questions. It also includes binary addition, and binary/denary/hex conversions. There's a select few other things too. Everything you just listed is in paper 1.


You missed out 7 other topics... Arrays, Table handling, Validation santilisation, SQL, Logic...
Original post by inox
Paper 2 is literally algorithm based questions. It also includes binary addition, and binary/denary/hex conversions. There's a select few other things too. Everything you just listed is in paper 1.


Is it? check the specification...
http://filestore.aqa.org.uk/resources/computing/specifications/AQA-8520-SP-2016.PDF

Sos, can't get a link... it says chapters 3-7 are paper 2.... it does have the conversions though. But Algorithms is chapter 1.... but I think they will probably include a couple algorithm questions because you need assumed knowledge of the first few chapters in it too.
Original post by qali23
Is it? check the specification...
http://filestore.aqa.org.uk/resources/computing/specifications/AQA-8520-SP-2016.PDF

Sos, can't get a link... it says chapters 3-7 are paper 2.... it does have the conversions though. But Algorithms is chapter 1.... but I think they will probably include a couple algorithm questions because you need assumed knowledge of the first few chapters in it too.


I think they're talking about OCR because that's how it's set out for that board.
Reply 9
Original post by Reversed Flash
You missed out 7 other topics... Arrays, Table handling, Validation santilisation, SQL, Logic...


I also said "there's a few other things too". I don't have that good of a memory. Plus, the topics I mentioned are the main ones in the papers that I've taken, hence I remember them. I was just using them as an example, considering he listed the *wrong* ones.

I'd be surprised if some of those even come up in any detail. Logic only shows up in the form of one true/false table at the end.
(edited 5 years ago)
Original post by qali23
Is it? check the specification...
http://filestore.aqa.org.uk/resources/computing/specifications/AQA-8520-SP-2016.PDF

Sos, can't get a link... it says chapters 3-7 are paper 2.... it does have the conversions though. But Algorithms is chapter 1.... but I think they will probably include a couple algorithm questions because you need assumed knowledge of the first few chapters in it too.


Thats a 2016 one but paper 1 was a lot of "theory" but what im revising is algorithms, Programming techniques, Producing Robus programs, Computational logic, Translators and Data representations (which is hexadecimal parts), Btw thats aqa
Reply 11


I take OCR papers. Is there an AQA paper 2 tomorrow as well?
Original post by inox
I also said "there's a few other things too". I don't have that good of a memory. Plus, the topics I mentioned are the main ones in the papers that I've taken, hence I remember them. I was just using them as an example, considering he listed the *wrong* ones.

I'd be surprised if some of those even come up in any detail. Logic only shows up in the form of one true/false table at the end.


Yes hopefully but sometimes exam boards can be the contrary and add a few things that will catch people out.
Reply 13
Original post by Reversed Flash
Yes hopefully but sometimes exam boards can be the contrary and add a few things that will catch people out.


I hope not lol! SQL and table handling is easy atleast.
Loops in pseudocode are the same as loops in a programming language. It's all about being able to write a set of instructions, and get the computer to run those instructions repeatedly, hence why they're known as loops - i.e. the same instructions being repeated over and over in a "loop", although each time it repeats there's usually different data. A single 'pass' through the loop's instructions is sometimes known as an iteration.

A loop always compries of at least two things:

One or more instructions (the "body" of the loop) - i.e. the instructions which are executed at each pass or iteration

A conditional expression - i.e. a boolean expression which evaluates to true or false at each pass or iteration. The conditional expression decides whether the computer will 'break out' of the loop, or whether there will be another iteration.



Just to illustrate the concept, while loop is possibly the simplest to understand - e.g.


WHILE ( Something is true )
Do instructions
END WHILE

The first thing a 'while' loop does is evaluate its expression for true or false.

In nearly all loops, the expression involves a variable whose value could change inside the loop body.

If the expression is true, it executes the body of the loop through a single pass.

When the loop has finished, the expression is evaluated again for true or false.

If the expression is still true, it executes the body of the loop through another single pass

When the loop has finished, the expression is evaluated again for true or false.

This keeps repeating until the expression finally evaluates to false - the program will 'break out' of the loop and carry on with the rest of the program.



Another way to express the while loop above would look like this:


LABEL "start"

IF ( Something is false )
GOTO LABEL "end"
ELSE
Do instructions
GOTO LABEL "start"

LABEL "end"


In a real programming language, a compiler would do something very similar to this. If you've studied CPU architecture, you might be familiar with a CPU register known as the Program Counter. The program counter keeps track of which line the CPU is going to execute next. CPUs have a "GOTO" instruction which allows a program to override the Program Counter. (Sometimes "GOTO" is known as "JUMP" or "BRANCH" - it's all the same thing though)

Compilers translate a while loop into machine code using "Goto" instructions to allow the CPU to keep repeating the same code - so when a while loop evaluates its condition as false, the CPU sees a GOTO instruction which move the program counter past the end of the loop to prevent it from being executed.

So that's how loops work in programming. Pseudocode is the same - you just need to imagine that there's a program counter somewhere, and remember that the loop is just modifying the program counter..
(edited 5 years ago)
Original post by Reversed Flash
A loop uses counts; now there are iterative, count and variable loops. In the exam any can come up.

An iterative loop uses variables - which contains values as a parameter; take the variable for example and iterate through X to the variable i.e X = 10 [FOR i in X (do this) else terminate. It is quite simple once you think about it as the program just looks at every value and compares its value using the parameter. Make you understand that iteration is NOT the same as sequencing


Thank you so much!
Original post by winterscoming
Loops in pseudocode are the same as loops in a programming language. It's all about being able to write a set of instructions, and get the computer to run those instructions repeatedly, hence why they're known as loops - i.e. the same instructions being repeated over and over in a "loop", although each time it repeats there's usually different data. A single 'pass' through the loop's instructions is sometimes known as an iteration.

A loop always compries of at least two things:

One or more instructions (the "body" of the loop) - i.e. the instructions which are executed at each pass or iteration

A conditional expression - i.e. a boolean expression which evaluates to true or false at each pass or iteration. The conditional expression decides whether the computer will 'break out' of the loop, or whether there will be another iteration.



Just to illustrate the concept, while loop is possibly the simplest to understand - e.g.


WHILE ( Something is true )
Do instructions
END WHILE

The first thing a 'while' loop does is evaluate its expression for true or false.

In nearly all loops, the expression involves a variable whose value could change inside the loop body.

If the expression is true, it executes the body of the loop through a single pass.

When the loop has finished, the expression is evaluated again for true or false.

If the expression is still true, it executes the body of the loop through another single pass

When the loop has finished, the expression is evaluated again for true or false.

This keeps repeating until the expression finally evaluates to false - the program will 'break out' of the loop and carry on with the rest of the program.



Another way to express the while loop above would look like this:


LABEL "start"

IF ( Something is false )
GOTO LABEL "end"
ELSE
Do instructions
GOTO LABEL "start"

LABEL "end"


In a real programming language, a compiler would do something very similar to this. If you've studied CPU architecture, you might be familiar with a CPU register known as the Program Counter. The program counter keeps track of which line the CPU is going to execute next. CPUs have a "GOTO" instruction which allows a program to override the Program Counter. (Sometimes "GOTO" is known as "JUMP" or "BRANCH" - it's all the same thing though)Programming languages use a "Goto" statement in machine code to allow the CPU to keep repeating the same code - so when a while loop evaluates its condition as false, it uses a GOTO statement to move the program counter past the end of the loop to prevent it from being executed. So that's how loops work in programming. Pseudocode is the same - you just need to imagine that there's a program counter somewhere, and remember that the loop is just modifying the program counter..


SO but everything you said said contains **** we don't need...
Original post by winterscoming
Loops in pseudocode are the same as loops in a programming language. It's all about being able to write a set of instructions, and get the computer to run those instructions repeatedly, hence why they're known as loops - i.e. the same instructions being repeated over and over in a "loop", although each time it repeats there's usually different data. A single 'pass' through the loop's instructions is sometimes known as an iteration.

A loop always compries of at least two things:

One or more instructions (the "body" of the loop) - i.e. the instructions which are executed at each pass or iteration

A conditional expression - i.e. a boolean expression which evaluates to true or false at each pass or iteration. The conditional expression decides whether the computer will 'break out' of the loop, or whether there will be another iteration.



Just to illustrate the concept, while loop is possibly the simplest to understand - e.g.



WHILE ( Something is true )
Do instructions
END WHILE


The first thing a 'while' loop does is evaluate its expression for true or false.

In nearly all loops, the expression involves a variable whose value could change inside the loop body.

If the expression is true, it executes the body of the loop through a single pass.

When the loop has finished, the expression is evaluated again for true or false.

If the expression is still true, it executes the body of the loop through another single pass

When the loop has finished, the expression is evaluated again for true or false.

This keeps repeating until the expression finally evaluates to false - the program will 'break out' of the loop and carry on with the rest of the program.



Another way to express the while loop above would look like this:



LABEL "start"

IF ( Something is false )
GOTO LABEL "end"
ELSE
Do instructions
GOTO LABEL "start"

LABEL "end"



In a real programming language, a compiler would do something very similar to this. If you've studied CPU architecture, you might be familiar with a CPU register known as the Program Counter. The program counter keeps track of which line the CPU is going to execute next. CPUs have a "GOTO" instruction which allows a program to override the Program Counter. (Sometimes "GOTO" is known as "JUMP" or "BRANCH" - it's all the same thing though)

Compilers translate a while loop into machine code using "Goto" instructions to allow the CPU to keep repeating the same code - so when a while loop evaluates its condition as false, the CPU sees a GOTO instruction which move the program counter past the end of the loop to prevent it from being executed.

So that's how loops work in programming. Pseudocode is the same - you just need to imagine that there's a program counter somewhere, and remember that the loop is just modifying the program counter..


OMG Thank you so much this was a really good explaination and i feel like understand it so much better now!!
Original post by ShylaB14
I think they're talking about OCR because that's how it's set out for that board.


Oh, it's OCR? That makes sense...

Quick Reply

Latest