Search CSNewbs
304 results found with an empty search
- 1.5 - Performance - Eduqas GCSE (2020 spec) | CSNewbs
Learn about the three factors that affect computer performance - cache memory size and levels, clock speed and the number of cores. Based on the 2020 Eduqas (WJEC) GCSE specification. 1.5: Performance Exam Board: Eduqas / WJEC Specification: 2020 + The performance of a computer system is affected by three main factors: Cache Memory: Size & Levels What is cache memory? Cache memory is temporary storage for frequently accessed data . Cache memory is very quick to access because it is closer to the CPU than other types of memory like RAM . What are the 3 levels of cache memory? Level 1 cache is the smallest level but it is also the fastest . Level 2 cache is larger than level 1 but slightly slower. Level 3 cache is located outside of the CPU core which makes it slower than the first two levels but it is much larger . How does cache memory work? When the CPU searches for data , it looks first in level 1 cache, then level 2 and then level 3 . If the data has been found , this is called a 'cache hit '. If the data is not found then the CPU searches in RAM instead which takes more time - this is called a 'cache miss '. How does cache memory improve performance? Cache memory is closer to the CPU than RAM , meaning that it can provide data and instructions to the CPU at a faster rate . A computer with more cache memory (e.g. 8MB instead of 4MB) should have a higher performance because repeatedly used instructions can be stored and accessed faster . Larger level 1 and level 2 cache sizes will improve a computer's performance as data can be accessed extremely quickly . What is the limitation of cache memory? Cache memory is costly, so most computers only have a small amount . Multiple cache misses will result in data latency (delay) as information is accessed from RAM which is further away from the CPU. Clock Speed What is clock speed? Clock speed is the measure of how quickly a CPU can process instructions . Clock speed is measured in Gigahertz (GHz) . A typical desktop computer might have a clock speed of 3.5 GHz . This means it can perform 3.5 billion cycles a second . How does clock speed improve performance? The faster the clock speed, the faster the computer can perform the FDE cycle resulting in better performance because more instructions can be processed each second . How does overclocking and underclocking affect performance? Typical clock speed: 3.5 GHz Underclocking Overclocking 3.9 GHz 3.1 GHz Overclocking is when the computer's clock speed is increased higher than the recommended rate. This will make the computer perform faster, but it can lead to overheating and could damage the machine . Underclocking is when the computer's clock speed is decreased lower than the recommended rate. This will make the computer perform slower but will increase the lifespan of the machine . Number of Cores What is a core? A core is a complete set of CPU components (control unit, ALU and registers). Each core is able to perform its own FDE cycle . A multi-core CPU has more than one set of components within the same CPU. How does the number of cores improve performance? In theory, a single-core processor can execute one instruction at a time , a dual-core processor can execute two instructions, and a quad-core can execute four instructions simultaneously . Therefore, a computer with more cores will have a higher performance because it can process more instructions at once . What are the limitations of having more cores? If one core is waiting for another core to finish processing, performance may not increase at all. Some software is not written to make use of multiple cores , so it will not run any quicker on a multi-core computer. Q uesto's Q uestions 1.5 - Performance: Cache Size & Levels 1a. What is cache memory ? [ 2 ] 1b. Describe the three levels of cache memory . [ 3 ] 1c. Describe what is meant by a ' cache hit ' and a ' cache miss '. [ 2 ] 1d. Describe two ways that more c ache memory will mean performance is higher . [ 4 ] 1e. Explain why most computers only have a small amount of cache memory. [ 1 ] Clock Speed 2a. What is clock speed ? What is it measured in? [ 2 ] 2b. Explain how a higher clock speed improves performance . [ 2 ] 2c. Explain the terms 'overclocking ' and 'underclocking ' and explain the effects of both on the performance of a computer. [ 4 ] Number of Cores 3a. What is a core ? [ 2 ] 3b. Explain why a quad-core processor should have a higher performance than a dual-core processor . [ 3 ] 3c. Explain two reasons why having more cores doesn't necessarily mean the performance will be better . [ 2 ] 1.4 - Secondary Storage 1.6 - Additional Hardware Theory Topics
- Python | Section 7 Practice Tasks | CSNewbs
Test your understanding of subroutines (procedures and functions) in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python - Section 7 Practice Tasks Task One Example solution: Create a program with three different subroutines (procedures ). One subroutine asks the user their name and prints a response. The second asks for their age and prints a response. The third asks for their favourite colour and prints a response. Remember to write subroutines before the main program. Task Two Create a program that asks a user to input the length of a side in a square. Write a function that takes this value and returns it to be printed. Example solution: Task Three Example solution: Create a program that takes 3 inputs from the user – a name, a villain and a place. Write a function that outputs a story using the user’s answers. Task Four Create a calculator program that uses four different subroutines (add, subtract, multiply and divide). In the main program ask the user to make a choice of which operator to use and then to enter two numbers. Keep looping until the user types stop. Use the 'Using Subroutines as a Menu' section in the 7b to help you. Example solution: ⬅ 7b - Functions 8a - Using Lists ➡
- 3.4 - Hardware & Routing - Eduqas GCSE (2020 spec) | CSNewbs
Learn about six network devices - hub, switch, router, bridge, WAP and NIC. Also, learn about routing tables and cost diagrams. Based on the 2020 Eduqas (WJEC) GCSE specification. 3.4: Network Hardware & Routing Exam Board: Eduqas / WJEC Specification: 2020 + Network Devices Hub A hub receives data packets from a connected device and transfers a copy to all connected nodes . Switch A switch receives data packets , processes them and transfers them on to the device specifically listed in the destination address of the packet. Router Routers are used to transfer data packets between networks . Data is sent from network to network on the internet towards the destination address listed in the data packet. A router stores the address of each computer on the network and uses routing tables to calculate the quickest and shortest path . Bridge A bridge joins together two networks that use the same base protocols . For example, a bridge could link together a LAN to another LAN . Wireless Access Point (WAP) Provides a link between wireless and wired networks . It creates a wireless local area network that allows WiFi enabled devices to connect to a wired network. Network Interface Card (NIC) A Network Interface Card (often shortened to NIC ) is an internal piece of hardware that is required for the computer to connect to a network . It used to be a separate expansion card but now it is commonly built directly into the motherboard (and sometimes known as a network adapter ). Wireless network interface cards ( WNIC ) permit a wireless network connection. Routing A routing table is a list of the optimal routes for data packets to be sent from one device to another. Routing tables should be kept accurate and up to date to ensure that packets are transferred as quickly as possible . During routing the lowest cost route is calculated . This is the shortest path with the fastest nodes to transfer data. Below is a simplified network and basic routing table showing the lowest cost (optimal) route using node A as the source address. Q uesto's Q uestions 3.4 - Network Hardware & Routing: 1a. Describe the difference between a hub and a switch . [ 2 ] 1b. Explain how a modem works. [ 2 ] 1c. Describe the purpose of a router . [ 2 ] 1d. Describe the difference between a gateway and a bridge . [ 2 ] 1e. State what WAP stands for and describe its purpose . [ 2 ] 1f. State what NIC stands for and why it is required . [ 2 ] 2a. Describe what a routing table is and why they should be maintained . [ 2 ] 2b. In terms of routing, what does a low-cost route mean? [ 2 ] 2c. Copy and complete the routing table below using node J as the source address . [ 4 ] 3.3 - Network Topology Theory Topics 3.5 - Protocols
- OCR CTech IT | Unit 1 | 5.2 - Operational Issues | CSNewbs
Learn about operational issues including disaster planning, change management and data security. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification. 5.2 - Operational Issues Exam Board: OCR Specification: 2016 - Unit 1 What are operational issues? Operational issues refer to potential problems that could disrupt the workflow and efficiency of an organisation . They relate to processes within an organisation and the way that the company operates on a daily basis . Security of Information Definition: Organisations must ensure that data is stored securely to minimise the chances of data loss , corruption or unauthorised manipulation . Having information stolen through a hacking attempt, for example, would negatively impact the company and its customers and possibly lead to consequences such as poor publicity , a loss of business and reputation , fines and bankruptcy . One principle of the Data Protection Act is that data must be stored securely . Organisations can use security methods such as firewalls , antiviruses or physical protection such as biometrics to keep personal information secure . Health & Safety Definition: Ensuring that employees, clients and visitors are physically protected on-site . The organisation should create a health and safety policy that staff need to read and possibly sign at the start of their work placement. The policy should include information about how to avoid injury when using the systems, how to safely maintain the equipment and whom to contact for help . Disaster & Recovery Planning Important data is often stored on a computer network, so a detailed and effective disaster recovery policy must be in place in case an unexpected disaster occurs. Disasters include natural disasters (e.g. fire, flood, lightning), hardware failure (e.g. power supply unit failing), software failure (e.g. virus damage) and malicious damage (e.g. hacking). There are three clear parts to a disaster recovery policy: Before the disaster: All of the possible risks should be analysed to spot if there are any weaknesses in preparation. Preventative measures should be taken after the analysis, such as making rooms flood-proof or storing important data at a different location . Staff training should take place to inform employees what should happen in the event of a disaster. During the disaster: The staff response is very important – employees should follow their training and ensure that data is protected and appropriate measures are put in place. Contingency plans should be implemented while the disaster is taking place, such as uploading recent data to cloud storage or securing backups in a safe room and using alternative equipment until the disaster is over. After the disaster: Recovery measures should be followed, such as using backups to repopulate computer systems. Replacement hardware needs to be purchased for equipment that is corrupted or destroyed. Software needs to be reinstalled on the new hardware. Disaster recovery policies should also be updated and improved . Organisational Policies Definition: Creating policies that outline acceptable computer and network use . Workplaces and schools often require people to sign an acceptable use policy ( AUP ) before being allowed to use the network . An AUP may include the philosophy of the organisation , rules for the personal use of IT resources and the consequences of breaching the policy . An AUP is similar to codes of practice from 5.1 . Change Management Definition: Change management is a formal approach by an organisation to lead a change in the way a business or project is run . This may include editing budgets , redefining expected deadlines , reconsidering how resources are used or changing staff roles . Advantages of change management: Reduces the likelihood of things going wrong during development. Creates a clear log of changes and improvements that are to be made. Allows changes to be approved and discussed before they happen. Formalises the process and sets out clear rules for changes . Disadvantages of change management: Can make the process of change more complicated . It can reduce the responsiveness of developers if everything must go through a formal process. It can be challenging to implement successfully. To work effectively, it needs everyone to follow the process . Scales of Change There are two main reasons why major change will occur in an organisation. Change Drivers Definition: Companies must change to stay up to date with the times and new technology . Change drivers are factors that force a business to change , such as: New legislation New competitors in the market New platforms (e.g. mobile technology and game consoles) to sell products on Economic changes Changes in business practice Social changes Change Needs Definition: Companies must change if the needs and focus of the organisation are altered over time . This reflects the changing needs of the business , often due to advancements in technology , such as: New equipment (e.g. replacing a slow network with a faster fibre optics network) Customer interaction (e.g.communicating with customers in new ways, such as social media apps) Workplace shifts (e.g. providing remote access for employees to access work and services at home) Q uesto's Q uestions 5.2 - Operational Issues: 1. Describe 3 possible consequences to an organisation if data is not stored securely . [6 ] 2. Describe the purpose of a health and safety policy and state 3 things that may be included in one. [4 ] 3a. Describe, giving specific examples , different types of possible disaster . [5 ] 3b. Describe the steps an organisation should take before , during and after a disaster occurs . [10 ] 4. Describe 3 things that may be included within an Acceptable Use Policy (AUP ). [3 ] 5a. What is change management ? Give 2 examples of when change management may be used. [4 ] 5b. Describe the advantages and disadvantages of a company deciding to implement change management . [8 ] 6a. Describe the difference between change drivers and change needs . [2 ] 6b. Describe 3 examples of change drivers and 3 examples of change needs . [6 ] 5.1 - Ethical Issues Topic List 5.3 - Threats
- A-Level Key Terms | CSNewbs
A key term generator to display randomised or sequential terms from the OCR A-Level Computer Science (H446) course. Filter terms by topics and 'favourite' tricky terms to focus on later. Perfect for students learning A-Level Computer Science in UK schools. A-Level Key Terms Generator If you see this message, your school may be using a strict network filter which has blocked it. The tool uses basic JavaScript and should work fine on a home network. Use this tool to check your understanding of the OCR A-Level Computer Science H446 specification's key terms . OCR A-Level Homepage
- 3.1 - Compression, Encryption & Hashing | OCR A-Level | CSNewbs
Learn about lossy and lossless compression and the lossless compression algorithms run-length encoding and dictionary coding. This topic also covers symmetric and asymmetric encryption and the uses of hashing. Based on the OCR H446 Computer Science A-Level specification. Exam Board: OCR A-Level 3.1 - Compression, Encryption and Hashing Specification: Computer Science H446 Watch on YouTube : Lossy & Lossless Compression Lossless Compression Algorithms Encryption Hashing Lossy vs Lossless Compression Compression is the process of reducing the size of a file so it takes up less storage space and can be transmitted more quickly over a network . It works by encoding data more efficiently or removing unnecessary information . Benefits of compression include faster file transfer speeds , reduced storage requirements and improved performance when streaming data . Lossy compression permanently removes some data that is less important to human perception , such as subtle sounds or image details , resulting in smaller file sizes but slightly lower quality . Lossless compression reduces file size without losing any data , allowing the original file to be perfectly restored after it is decompressed . Lossless Compression Algorithms There are two types of lossless compression that you need to know: Run-Length Encoding (RLE ) is a simple form of lossless compression that reduces file size by storing repeating data as a single value and a count . For example, a sequence like AAAAABBBCCCC could be stored as A5B3C4 , saving space in files with many repeated elements , such as pixels in images . Dictionary Encoding replaces repeating patterns of data with shorter codes that reference entries in a dictionary . The dictionary stores common sequences once , and each repetition is replaced by a shorter reference , making it efficient for text and other data with recurring patterns . YouTube video uploading soon Encryption Encryption is the process of converting readable data (plaintext ) into an unreadable form (ciphertext ) to prevent unauthorised access . It ensures the confidentiality and security of information during storage or transmission . There are two key types of encryption : Symmetric encryption uses the same key for both encryption and decryption , meaning the sender and receiver must share the key securely . It is fast and efficient , making it suitable for encrypting large amounts of data . However, key distribution is a major risk if the key is intercepted . Asymmetric encryption uses a pair of keys - a public key for encryption and a private key for decryption . It is more secure for communication but slower due to complex mathematical processes . Asymmetric encryption is often used to exchange symmetric keys securely before data transfer . YouTube video uploading soon Hashing Hashing is the process of applying a mathematical function (hash function ) to data to produce a fixed-size value , known as a hash . It is a one-way process , meaning the original data cannot be reconstructed from the hash . Hashing is commonly used for data integrity checks , password storage and digital signatures . Even a tiny change in the input data produces a completely different hash , making it useful for detecting tampering or corruption . YouTube video uploading soon This page is under active development. Check here for the latest progress update. Q uesto's K ey T erms Compression: lossy compression, lossless compression, run-length encoding, dictionary encoding Encryption: plaintext, ciphertext, key, symmetric encryption, asymmetric encryption Hashing: hash function, hash D id Y ou K now? Alan Turing and his team used pattern recognition to analyse recurring sequences in encrypted German messages , helping to break the Enigma code , which was a major factor in the Allies’ victory in World War II . 2.4 - Programming Languages A-Level Topics 3.2 - Databases
- 2.3 - Quality of Information | Unit 2 | OCR Cambridge Technicals | CSNewbs
Learn about the characteristics of information and the impacts of both good and poor quality information on customers and stakeholders. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification for Unit 2 (Global Information). 2.3 - Quality of Information Exam Board: OCR Specification: 2016 - Unit 2 Information Characteristics Valid Information This is correct, up-to-date and complete information that fits its purpose . For example, detailed end-of-year financial data in the form of graphs. Biased Information This is technically correct, but slanted , information that presents a one-sided view . For example, end-of year financial data that focuses on profits and ignores significant losses. Relevant Information Information should be appropriate for the required purpose . Irrelevant information may get in the way of correct decision making. Accurate Information Information should be carefully selected and entirely correct , inaccurate information can lead to unwanted consequences such as higher costs and missed deadlines. Reliable Information Information from a source that can be verified and confirmed to be correct . For example, BBC News is a more reliable information source than social media posts. Information Quality The quality of information that an organisation uses will have a significant impact on further processes and decisions. Good quality information that is accurate , valid or reliable can lead to better strategic decisions , meeting deadlines and innovation . Poor quality information that is biased , inaccurate or out of date may lead to negative consequences such as loss of customer trust , fines and legal challenges . Positive Effects of Good Quality Information Reliable information received by the management team . Good quality research information. Good quality sales information. Accurate cost projection information. Informed decisions with a higher chance of success . Can lead to innovation and better understanding . Strategic decisions and planning ahead . Projects will stay within their budget . Accurate time expectations . Projects will be completed on time . Negative Effects of Poor Quality Information Biased survey with inaccurate results . Inaccurate stock information. Out of date information received by management . Inaccurate data has led to poor reviews online . Inaccurate time expectations . Misinformed decisions , not responding to customers needs . ??? Inaccurate delivery times , customers unhappy . Too much / little stock. Miss out on opportunities , possible fall in profits . Loss of customer trust , loss of customers and reputation . Financial issues . Projects take longer , cost more , stakeholders unhappy . Possible project failure . Q uesto's Q uestions 2.3 - Quality of Information: 1. Describe 5 characteristics of information . [10 ] 2. Explain 5 positive impacts of good quality information . [10 ] 3. Explain 5 negative impacts of poor quality information . [10 ] 2.2 - Information Classification 2.4 - Information Management Topic List
- Greenfoot Guide #3 | Random Movement | csnewbs
Learn how to edit code in Greenfoot to make objects move randomly across the screen. This can be used on 'enemy' objects. Part 3 of the Greenfoot Tutorial for the Eduqas / WJEC GCSE 2016 specification. 3. Random Movement 1. Code for Random Movement Greenfoot Tutorial Watch on YouTube: Right-click on your enemy class on the main screen and select ' Open editor '. The enemy character should always be moving, so start with move(1); Next we will use an if statement to start the random movement. This code generates 10 random numbers and if it is less than 1 then it will run the proceeding code. If we don't do this, the character will turn too much or too little . This code generates a random angle between 0 and 90. The - 45 part is necessary otherwise the character will always move to the right . See the diagram below for an explanation: 2. Bounce at World Edge You may have noticed that the enemy objects can get 'stuck' in the corners or when they hit the edge of the world. In the act() method, below the random movement code , add the code in the red box . This code checks to see if the object is at the edge , and turns it around ( 180 degrees ) if it is. 3. Compile and Run Click the Compile button at the top of the code editor . Then you can go back to the main Greenfoot window and click Run to test if your enemy objects move . Click on me if you've got an error that you're stuck with. < Part 2 - Movement with the Arrow Keys Part 4 - Remove Objects >
- Python | 4c - Logical Operators | CSNewbs
Learn how to use logical operators in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python 4c - Logical Operators AND Operator The AND operator is used to execute certain code if more than one thing is true . AND is commonly used with account logins - both the username AND the password must be correct . The example below requires both a secret word and a secret number to be correct: print ( "To enter you need the secret word and the secret number!" ) word = input ( "What is the secret word? " ) number = int ( input ( "What is the secret number? " )) if word == "solitude" and number == 2011: print ( "Correct! You may enter!" ) else : print ( "Incorrect! Get out of here!" ) If no part or only some of the if statement is true then the indented code will not run : To enter you need the secret word and the secret number! What is the secret word? solitude What is the secret number? 4503 Incorrect! Get out of here! To enter you need the secret word and the secret number! What is the secret word? windhelm What is the secret number? 1021 Incorrect! Get out of here! Only If all parts of the if statement are true will the indented code be executed : To enter you need the secret word and the secret number! What is the secret word? solitude What is the secret number? 2011 Correct! You may enter! Logical Operators Task 1 ( Three Easy Questions) Ask the user three easy questions and print a special response if they get all three correct . Use the and operator to see if their answer for all each of the questions is correct. You must use a unique variable nam e for each of your inputs (it can't be 'answer' for all three, for example). Example solutions: What is the capital of Germany? Berlin What is the chemical formula for water? H20 What year did World War Two end? 1945 You absolute genius! What is the capital of Germany? Vienna What is the chemical formula for water? W20 What year did World War Two end? 1945 Bit awkward, I thought you'd do better... OR Operator The OR operator is used to execute certain code if one of several statements is true . The program below is checking if either a , e , i , o or u were entered. letter = input ( "Enter a letter: " ) if letter == "a" or letter == "e" or letter == "i" or letter == "o" or letter == "u" : print ( "You entered a vowel." ) else : print ( "You entered a consonant." ) Enter a letter: f You entered a consonant. Enter a letter: e You entered a vowel. It is important that you re-write the variable and operator (e.g. letter ==) each time you use 'or' . It will not work if you just write: if letter == “a” or “e” or “i” or “o” or “u”: Logical Operators Task 2 ( Twins?) Ask the user to enter their favourite colour and then ask them their age . If their favourite colour is the same as yours AND their age is the same as yours then print “Snap! Are you my twin?” . If only one of the statements is true (use the OR operator) then print “Spooky! You’re a bit like me.” . Add an else statement to print “We’re not so similar, you and I.” if there's nothing in common. Example solutions: What's your favourite colour? green What's your age? 15 Snap! Are you my twin? What's your favourite colour? blue What's your age? 15 Spooky! You're a bit like me. What's your favourite colour? red What's your age? 16 We're not so similar, you and I. ⬅ 4b - Mathematical Opera tors Sectio n 4 Practice Tasks ➡
- CSN+ Preview | CSNewbs
About CSNewbs Plus (CSN+) CSN+ is a premium collection of resources made for teachers that follows the Computer Science specifications covered on the website . Currently, these resources are in development , with the Eduqas GCSE resource pack arriving first, based on the Eduqas GCSE Computer Science 2020 specification . < Free zip folder download of all resources for Eduqas GCSE topic 1.1 (The CPU) *Updated Jan 2021* Resources included for each topic: Lesson Slides Starter activity (to print) Task resources (e.g. diagrams or worksheets to print) Task answers What is included in the CSNewbs+ GCSE collection? 39 presentation slides 39 starters 39 task answer documents 19 revision activity pages 7 topic tests & answers See below for more details: + Complete presentation slides for each of the 39 theory topics in the Eduqas GCSE 2020 specification . PowerPoint and Google Slides compatible. Activity resources to print . Including diagrams , tables and worksheets for lesson tasks . All answers included for teachers to use. Starter questions that recap the previous topic. For teachers to print before the lesson. All answers included in the lesson slides. 39 starters . Comprehensive answers for all lesson tasks . 39 task answer documents containing answers for over 100 lesson tasks for teachers to use . Revision templates for students to complete, to print on A3 paper . 19 pages and 7 revision lesson slides . Exercise book headings and the driving question (lesson focus) 7 end-of-topic tests with brand new questions . All answers included for teachers. What is included on the presentation slides? The following breakdown shows the presentation slides for 1.1 (The CPU): A title slide The content covered from the Eduqas GCSE specification Exercise book headings and the driving question (lesson focus) Answers to the starter activity questions Lesson objectives An explanation of the topic Clear explanations of the content First task. Students use slides or CSNewbs to complete. All answers on separate teacher document. Task 2. Table provided in teacher resource pack to print. Further explanations of the content Further explanations of the content with diagrams. Further explanations of the content with diagrams. Task 3. Answers in the teacher document. Plenary to check the students' understanding of the lesson topics. < Free zip folder download of all resources for Eduqas GCSE topic 1.1 (The CPU) *Updated Jan 2021*
- Searching & Sorting Algorithms - OCR GCSE (J277 Spec) | CSNewbs
Learn about searching algorithms such as linear and binary search. Also learn about sorting algorithms such as merge, bubble and insertion sorts. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). 1.3: Searching & Sorting Algorithms Exam Board: OCR Specification: J277 Watch on YouTube : Linear Search Binary Search Bubble Sort Merge Sort Insertion Sort Key features of a bubble sort: Uses an outer while loop (condition controlled ) to check no swaps have been made . Uses an inner for loop (count controlled ) to repeat through the length of the data set . Uses a flag (a Boolean value ) to track if a swap has been made and uses a temporary value to help correctly swap elements . Linear Search A linear search is the most simple search algorithm. Each data item is searched in order from the first value to the last as if they were all laid out in a line . The list does not have to be in any order before it is searched . This search is also known as a sequential search because the list is searched in a sequence from start to end. For large lists , this search is not very efficient . Binary Search A binary search is a much more efficient searching algorithm as it generally searches through fewer data and is often much quicker - especially for large data sets . In a binary search, the middle point of the data is selected with each iteration and compared to the value being searched for . When the midpoint matches the target value , it as been found and the search can stop. ! ! However there is a prerequisite of using a binary search - the list of data must already be sorted . A prerequisite is a condition that must be satisfied before an algorithm will work correctly . Merge Sort Merge sort is a sorting algorithm based on the idea of ‘divide and conquer ’. A merge sort divides a list into half , again and again until each data item is separate . Then the items are combined in the same way as they were divided , but now in the correct order . When the individual lists are all merged together as one list again, then the data is in order and the algorithm will end . Bubble Sort This algorithm is based on the comparison of adjacent data elements . Data elements are swapped if they are not in the correct order . The algorithm will only stop when a complete iteration through the data is completed with no swaps made . A bubble sort is not suitable for large sets of data . Insertion Sort The list is logically split into sorted values (on the left) and unsorted values (on the right). Starting from the left, values from the unsorted part are checked and inserted at the correct position in the sorted part. This continues through all elements of the list until the last item is reached, and sorted. Insertion sorts are efficient for small data sets but would be slow to sort large sets , compared to alternatives such as a merge sort. Key features of a linear search: A loop is used to check the first value in a list and increment by 1 , checking each value for a match to the target . Reaching the last element of the list without finding a match means the value is not included . Key features of a binary search: A midpoint , lowpoint and highpoint are calculated . A while loop is used to repeatedly compare the midpoint to a target value . The upper half or lower half of the data is ignored if the midpoint does not equal the target . Key features of a merge sort: This algorithm calls itself from within the subroutine (this is known as a recursive algorithm ). It continually splits sublists into a left side and a right side until each sublist has a length of 1 . Watch on YouTube Watch on YouTube Watch on YouTube Watch on YouTube Key features of a insertion sort: Uses an outer for loop (count controlled ) to iterate through each value in the list . Uses an inner while loop (condition controlled ) to find the current value’s correct position in the sorted part of the list . An insertion sort moves ‘ backwards ’ to find the correct position of each value, by decreasing the index within the while loop. Watch on YouTube Q uesto's Q uestions 1.3 - Searching & Sorting Algorithms: Linear Search Explain step-by-step how the number 8 would be found in the following list using a linear search : 12, 5, 3, 2, 8, 19, 14, 6 [4 ] Binary Search Explain step-by-step how the number 2 would be found in the following list using a binary search : 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 [6 ] Merge Sort Explain step-by-step how a merge sort would sort the following list of numbers: 4, 8, 5, 1, 3, 6, 7, 2 [6 ] Bubble Sort Explain step-by-step how a bubble sort would sort the following list of numbers: 3, 1, 6, 5, 2, 4 [6 ] Insertion Sort Explain step-by-step how an insertion sort would sort the following list of numbers: 5, 2, 6, 3, 1, 4 [6 ] 1.2 - Designing Algorithms Theory Topics 2.1 - Programming Fundamentals
- 8.1 - Programming Principles - Eduqas (2020 Spec) | CSNewbs
Learn about algorithms including programming principles, variables and sequencing. Based on the 2020 Eduqas (WJEC) GCSE specification. 8.1: Programming Principles Exam Board: Eduqas / WJEC Specification: 2020 + Problem Solving There are four stages to computational thinking (smart problem solving ). Decomposition is when you break a problem down into smaller tasks so that it is easier to solve . Pattern Recognition is the process of identifying similar patterns within a problem . Abstraction is when you ignore unnecessary information and focus only on the important facts . Algorithms are the final stage as step-by-step rules are created to solve the problem . An algorithm is usually written as psuedocode or presented as a flowchart . Programming Constructs There are three constructs (ideas) of programming that most programs will contain: Sequence Structuring code into a logical, sequential order . Selection Decision making using if statements . Iteration Repeating code , often using for loops or while loops . Variables Large programs are often modular - split into subroutines with each subroutine having a dedicated purpose. Local variables are declared within a specific subroutine and can only be used within that subroutine . Global variables can be used at any point within the whole program . Local variable advantages Saves memory - only uses memory when that local variable is needed - global variables use memory whether they are used or not. Easier to debug local variables as they can only be changed within one subroutine. You can reuse subroutines with local variables in other programs. Global variable advantages Variables can be used anywhere in the whole program (and in multiple subroutines). Makes maintenance easier as they are only declared once. Can be used for constants - values that remain the same. Local & Global Variables Constants A variable is data that can change in value as a program is being run. A constant is data that does not change in value as the program is run - it is fixed and remains the same. An example of a constant in maths programs is pi - it will constantly remain at 3.14159 and never change. π π Counts & Rogue Values When using iteration (looping) the loop must eventually be able to stop. A count is a variable that is used to record the current iteration (loop number). A rogue value is an unexpected value that will cause the loop to end . For example by typing "Stop" into a loop that asks for numbers. Self-documenting Identifiers An efficient program will use variables with sensible names that immediately state their purpose in the program. Using variable names like 'TotalNum' and 'Profit' rather than 'num1' and 'num2' mean that other programmers will be able to work out the purpose of the code without the need for extensive comments. Q uesto's Q uestions 8.1 - Programming Principles: Problem Solving 1. What is meant by 'decomposition '? Why is it important ? [2 ] 2. What does the term 'abstraction ' mean? Why is it important ? [2 ] 3. What is pattern recognition ? [2 ] 4a. What is an algorithm ? [1 ] 4b. What are the two ways of writing an algorithm ? [2 ] Programming Constructs 1. Describe and draw a diagram for the 3 programming constructs . [6 ] Variables 1. What is the difference between local and global variables ? [4 ] 2. Describe two advantages of using local variables . [2 ] 3. Describe two advantages of using global variables . [2 ] 4. What is a constant ? Give an example . [2 ] 5. Why is it important to use self-documenting identifiers when programming? [2 ] 6. What is a count ? What is a rogue value ? [2 ] 7.1 - Language Levels Theory Topics 8.2 - Understanding Algorithms








