AdBlock Detected!

Our website is made possible by displaying ads to our visitors. Please support us by whitelisting our website.

Computer Neek

Select from the list

AQA computer science 2017 - Paper 1 Section B in c#

This section asked you to output how many times each letter in the users input occurs. What made this hard was the fact that if there was duplicate letters, you could only output one of those letters and the amount of times that letter occurred next to it. In essence, you must output the quantity of instances of each letter next to its initial occurrence or at least output it next to one duplicate letter. The .Split() we learnt this in the programming page.


To learn how to use .Split() in more depth click here

Image of 2017 AQA past paper section B code of 2017 AQA paper 1 Section B

AQA computer science 2018 - Paper 1 Section B in c#

This question essentially asks you to write a program that checks if a number is a prime number


To learn how to use modulus(%) in more depth click here


Image of 2018 AQA past paper section B code of the 2018 AQA paper 1 section

AQA computer science 2019 - Paper 1 Section B in c#

This question essentially asks you to write a program that enters in two words seperatly from the user and sees if the first word can be created from the letters of the second word.


To learn how to use .Contains() in more depth click here


Image of 2019 AQA past paper section B code of the 2018 AQA paper 1 section

The image above when the .split() is used just above the the first if statement, works out how many times each char in the given string appears in that string and stores it in the variables "firstWordFreq" and "secondWordFreq". For an example, in the word meet, the letter (e) appears twice. That line recognises that it appears twice. Since we are checking if we can create the first word from letters of the sceond word, that must mean that the amount of duplicate letters in the second word ("secondWord") must be greater than or equal to the amount of same duplicate letters in the first word.

For an example, if the first letter was "good", the second letter must have at least two or more letter "o" so that the first word can be created form the letters of the second word.

AQA computer science 2020 - Paper 1 Section B in c#

This question essentially asks you to write a program that finds the mode. In this example, I found it easier to use a string rather than using an int but for the purpose of the program, I still asked the user to enter in how many numbers they were entering. This suggests that they were probably expecting you to use a for loop but this way stille works.


To learn how to use .Split() and .Contains() or .Max() in more depth click here


Image of 2020 AQA past paper section B code of the 2020 AQA paper 1 section

To see the techniques used in the solutions click me