top of page

Search CSNewbs

304 results found with an empty search

  • 2.2 - Computational Methods | OCR A-Level | CSNewbs

    Learn about computational methods including problem recognition, decomposition, divide and conquer, abstraction, backtracking, data mining, heuristics, performance modelling, pipelining and visualisation. Based on the OCR H446 Computer Science A-Level specification. Exam Board: OCR A-Level Specification: Computer Science H446 2.2 - Computational Methods Watch on YouTube : Problem recognition Decomposition Divide and conquer Abstraction Backtracking Data mining Heuristics Performance modelling Pipelining Visualisation Computational methods are techniques to analyse problems and design efficient , effective solutions . Problem Recognition Problem recognition is the process of identifying that a problem exists and understanding its nature before attempting to solve it. It involves determining the aims of the task , identifying constraints and requirements , and clarifying what inputs , outputs and processes are expected from the solution . Effective problem recognition ensures the developer understands the real-world context and avoids solving the wrong problem or missing key details . It is the essential first step that guides all later stages of computational thinking and system design . YouTube video uploading soon Decomposition Decomposition involves breaking a complex system or task into smaller , more manageable components that are easier to design , implement and test . Each sub-problem should ideally be independent and solve a specific part of the overall task , which helps reduce complexity and supports modular program design . This approach enables different developers to work on different components simultaneously and simplifies debugging , maintenance and future updates . By working through smaller logical parts , the full problem becomes far more approachable and structured . YouTube video uploading soon Divide and Conquer Divide and conquer is a technique that splits a problem into smaller sub-problems of the same type , solves them (often using recursion ), and then combines the solutions to produce the final answer . This approach can significantly improve efficiency by reducing large input sizes into more manageable chunks , as seen in algorithms like quicksort . Divide and conquer algorithms include a binary search and a merge sort . The time complexity of divide and conquer algorithms is logarithmic - O(log n) - allowing complex problems to be solved much quicker than other algorithms . YouTube video uploading soon Abstraction Abstraction means removing unnecessary details to focus only on the most important features of a problem or system . It allows programmers to create simplified models that capture essential behaviour without becoming overwhelmed by irrelevant complexities . Abstraction enables generalisation , reusable designs and clearer reasoning about how components interact . In computational contexts, abstraction also highlights the difference between real-world systems and their simplified computational models . YouTube video uploading soon Backtracking Backtracking is used to explore possible solutions to a problem by building a partial solution and abandoning it as soon as it becomes clear it cannot succeed . It works by trying an option , checking whether it leads towards a valid solution , and backtracking to try a different path if a dead end is reached . This approach is used in constraint-based problems such as maze solving . While powerful , backtracking can be computationally expensive , so it often benefits from heuristics or pruning strategies . YouTube video uploading soon Data Mining Data mining is the process of extracting useful patterns , trends and relationships from large datasets . It enables organisations to identify hidden insights , predict behaviours and support data-driven decision-making , particularly in fields such as marketing , healthcare , finance and security . Data mining can lead to enhanced decision-making that can result in innovation , a competitive advantage against similar organisations and increased revenue . It can be used to identify anomalies or unused features . However, data mining doesn't explain the patterns it can identify and it requires powerful computers with a lot of processing power to handle huge amounts of data . YouTube video uploading soon Heuristics Heuristics are approximate problem-solving strategies that aim to produce good solutions quickly when exact , optimal methods are too slow or computationally impractical . They rely on rules of thumb to guide searches through very large solution spaces efficiently . Heuristics are widely used in artificial intelligence , optimisation tasks and complex search algorithms such as A* , where perfect accuracy is less important than fast , practical solutions . The trade-off is that heuristic methods are not guaranteed to produce the optimal answer , but they dramatically reduce processing time . YouTube video uploading soon Performance Modelling Performance modelling is the process of predicting how a system or algorithm will behave under different workloads , input sizes or hardware environments . It uses tools such as mathematical analysis , simulation and Big O notation to estimate required resources such as processing time or memory use . Performance modelling offers a cheaper , quicker and often safer way to test applications . For example, when a company beta tests an online game , it can trial the system with a smaller group of players and then apply performance modelling to predict how much server capacity will be needed when the game is fully released . YouTube video uploading soon Pipelining Pipelining is a technique in which different stages of a process are overlapped so that multiple instructions or operations are being processed simultaneously at different stages . In CPU architecture , for example, one instruction might be fetched while another is decoded and a third is executed , increasing overall throughput without increasing clock speed . Pipelining can also be used in algorithms or data-processing systems to prevent idle time in stages that operate independently . However, pipelining introduces complexity because dependencies or branch mispredictions may require a pipeline to be flushed - interrupting flow and reducing efficiency . YouTube video uploading soon Visualisation Visualisation supports the understanding of a problem by presenting information in a clearer and more accessible form than text alone . It is useful for explaining complex ideas or identifying patterns . Data can be shown visually through diagrams , graphs , trees , flowcharts or tables . The advantages of visualisation include helping to model , represent , analyse or summarise complex concepts . It allows information to be communicated more clearly and in a way that is easier to interpret . It can also provide different perspectives on how a problem might be solved . YouTube video uploading soon This page is under active development. Check here for the latest progress update. Q uesto's K ey T erms Computational Methods: problem recognition, decomposition, divide and conquer, abstraction, backtracking, data mining, heuristics, performance modelling, pipelining, visualisation D id Y ou K now? Real-time location services like Google Maps use heuristics to guess travel times using heuristics such as estimated speeds , traffic history and shortcuts to make fast but approximate route suggestions . 2.1 - Programming Techniques A-Level Topics 3.1a-d - Algorithm Complexity

  • OCR Cambridge Technicals | CSNewbs

    A splash page for the previous Cambridge Technicals units - Unit 1 (Fundamentals of IT) and Unit 2 (Global Information). OCR Cambridge Technicals IT Level 3 These pages are based on content from the OCR Cambridge Technicals 2016 Level 3 IT specification . This qualification stopped in July 2025. The pages on the site will remain for at least two years. Unit 1 Fundamentals of IT Unit 2 Global Information

  • 6.6 - Logical Protection | Unit 2 | OCR Cambridge Technicals | CSNewbs

    Learn about the methods of digital protection including antimalware, firewalls and obfuscation. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification for Unit 2 (Global Information). 6.6 - Logical Protection Exam Board: OCR Specification: 2016 - Unit 2 Logical protection refers to using digital methods of security to protect computer systems and data. Usernames & Passwords ****** Anti-Malware Usernames must be matched with a secure password to minimise the chances of unauthorised users accessing a system. Passwords should contain a mix of uppercase and lowercase letters , punctuation and numbers . Passwords should be of a substantial length (at least 8 characters) and should be regularly changed . Anti-virus software scans a system and removes viruses . If left to infect a system a virus could delete data or permit access to unauthorised users . Anti-spyware software removes spyware on an infected system so hackers cannot view personal data or monitor users. Organisations should install and regularly update anti-virus and anti-spyware programs. Firewall Encryption Firewalls prevent unauthorised access to or from a network . Firewalls filter data packets and block anything that is identified as harmful to the computer system or network. Firewalls can also be used to block access to specific websites and programs. A firewall can be in the form of a physical device which is connected to the network, or software installed on a computer system. Encryption is the conversion of data ( plaintext ) into an unreadable format ( ciphertext ) so it cannot be understood if intercepted . Encrypted data can only be understood by an authorised system with a decryption key . There are two types of encryption . Encryption at rest is when data is encrypted while it is being stored on a system or storage drive. Encryption in transit is to secure the data as it being transferred between systems on a network. Tiered Levels of Access Obfuscation ?????? The purpose of tiered levels of access is to grant different types of permission to certain users. Managing levels of file access ensures that only authorised people can access and change certain files . There are different levels of file access : No access Read-only - Allows a user to view but not edit. Read/write - Allows a user to view and edit. Obfuscation is when data is deliberately changed to be unreadable to humans but still understandable by computers . Program code might be obfuscated to stop rival programmers from viewing and stealing it if they were able to access it. Specialist software can be used to obfuscate data and convert it back into a human-readable format. Q uesto's Q uestions 6.6 - Logical Protection: 1a. Describe why usernames and strong passwords are necessary. [2 ] 1b. State 3 rules for choosing a strong password . [3 ] 2. Describe the purpose of anti-virus and anti-spyware software. [4 ] 3. Describe the roles of a firewall . [4 ] 4. Explain what encryption is. What are the two types? [4 ] 5. Why would an organisation use tiered levels of access ? What are the 3 levels of file access ? [5 ] 6. What is obfuscation ? State a scenario in which it would be used. [3 ] 6.5 - Physical Protection Topic List

  • 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

  • 7.1 - Language Levels - Eduqas GCSE (2020 Spec) | CSNewbs

    Learn about the two types of language levels, high level and low level, including explanations and examples. Based on the 2020 Eduqas (WJEC) GCSE specification. 7.1: Language Levels Exam Board: Eduqas / WJEC Specification: 2020 + There are two types of programming languages used within computer systems: High-Level Languages Why do programmers use high-level languages? H igh-level programming languages use code written in a way that is similar to a natural human language , such as English, making it easier to understand and use the language. Using high-level languages leads to fewer errors and allows for more powerful and complex commands compared to low-level languages. However, a high-level language must be translated into machine code (binary) before it can be run, as high-level languages cannot be executed directly by the CPU . Popular high-level languages: PYT HON C++ Ja v a Visual Basic Low-Level Languages Low-level languages do not closely resemble a natural human language , making it harder for humans to understand and write in. Low-level languages are used when a program must be executed quickly or when programmers need to write code that interacts directly with the hardware , such as device drivers. There are two types of low-level language : Machine Code This is the pure binary code that computers can directly process and execute . It is extremely tedious and difficult for humans to understand and write machine code. However, machine code can be used when a programmer needs to perform a very specific command that can't be done in a high-level language. Machine code will be executed faster than high-level programs because it is already in a format the CPU can execute and does not need to be translated . 0010 1011 0101 0101 0110 0111 0101 0001 0101 0101 0101 0100 1010 1010 1010 1010 1111 1110 0010 1001 0100 1001 0010 0111 0111 0101 0011 1010 1000 0101 0110 0111 0000 1010 1010 0011 1101 1001 0010 1101 0010 0100 1001 0011 1010 1001 0101 0101 0010 0101 0111 0101 0101 1000 1011 0111 Assembly Language Assembly language uses specialised command mnemonics to perform actions . See the Assembly Language section in the programming tab for a list of mnemonics such as INP , OUT and HLT . Assembly language is preferred by many programmers over machine code because it is easier to understand and spot errors . It is faster to execute than high-level languages and, like machine code, can be used to directly control the CPU . Q uesto's Q uestions 7.1 - Language Levels: 1a. Describe three reasons why programmers use high-level languages . [ 3 ] 1b. Explain one limitation of using high-level languages . [2 ] 2a. Describe a key difference between low-level languages and high-level languages . [ 2 ] 2b. Describe when a low-level language would be used instead of a high-level language . [2 ] 2c. Describe an advantage and a disadvantage of writing directly in machine code . [2 ] 2d. Describe what assembly language is. Give one benefit to using assembly language instead of machine code and one benefit to using it instead of a high-level language . [3 ] 3. Compare high-level and low-level languages by stating which is: a. Easier to understand [ 1 ] b. Requiring translation [ 1 ] c. Quicker to execute [ 1 ] INP STA Number1 OUT HLT Number1 DAT 6.2 - Utility Software Theory Topics 8.1 - Programming Principles

  • App Inventor 2 | Variables | CSNewbs

    Learn how to use App Inventor 2 to create simple programs. Try to complete tasks 4, 5 and 6 on this page. Perfect for Key Stage 3 students to experiment with block coding, objects and properties. App Inventor Tasks 4, 5 & 6 - Using Variables This page will teach you how to make three simple apps that use variables . These apps will prepare you for the final program - the Pop-up Blob game. App #4 - Button Masher The first app to make is a simple program that counts how many times a button is pressed (but don't press it too much! ) This app will introduce you to using variables in App Inventor. Open App Inventor 2 (use the button below) and create a new project. You will need to log in with a Google account. App Inventor 2 Firstly, grab a button and two labels and place them in the Viewer . Using the Properties tab, you need to make the following changes: Button Text to 'Press Me!' Button Height to 60 pixels and Width to 'Fill parent...' Label 1 Text to 'Number of Presses' Label 2 Text to '0' Both Label 1 and Label 2 Width to 'Fill parent...' Both Label 1 and Label 2 TextAlignment to 'centre : 1' In the Components tab change the component names to be easier to code later. Switch to Blocks layout and drag an initialize global to block into the centre. In the blank space type 'Presses' - this is the name of the variable that will store how many times the button has been pressed. Drag a 0 block from Math. This will set the number of presses to 0 when the app starts. Drag a when ButtonPresses Clicked from the ButtonPresses section and add the necessary code inside. This code increases the variable value of Presses by 1 every time the button is clicked. It also changes the LabelPresses text to display the number of presses. Improve Your App As you will have seen in the video at the top, I programmed the app to go a bit crazy when 35 presses were recorded. In the code below I have shown how to use an if then block to check if the number of presses is 35. If it is then I have made the button invisible - this is an important feature we will use in later programs. Copy this code and add the following features to the then part of the if statement: Set the background colour to black. Change the Label1 Text Colour to white. Change the Label1 Text Size to 40. Change the Label1 Text to 'You broke it...' Program 4 Complete! App #5 - Timer The second app to make is a timer that counts up one second at a time. It also needs a reset button that sets the timer back to 0 again. It will introduce you to the clock component and enabling / disabling components. Open App Inventor 2 (use the button below) and create a new project. You will need to log in with a Google account. App Inventor 2 The code for this program is straightforward; it will take more effort getting the layout right. In the Palette tab, drag a HorizontalArrangement from the Layout section. It will look like an empty grey box at first. Grab a Button as well and place it underneath. Now drag two labels into the grey box and place the second one directly after the first, it may take a few attempts to get them to appear side by side like below: The last component to drag over is Clock (it is in the Sensors section in the Palette tab). It will go into its own section underneath: Change the name of some of the components so that they make more sense. Now to make some changes in the Properties tab. You should know enough by now to work out how to change your components so that it looks like this in your Viewer : Change your layout to Blocks and add the code blocks to the right. This code makes the Label named Seconds update by 1 every second, just like a timer. The code to the left will make the Label named Seconds reset to 0 when the button is pressed. Improve Your App As you will have seen in the video at the top of this task, I added a pause/unpause button that will set the enabled feature of the timer to true or false. You will need to complete the following steps (I've been deliberately vague to make it a challenge - break it down into small steps and use the colours to help you): Add a new button. Add code that, when the new button is clicked , checks if the TimerEnabled is true . If it is, then change TimerEnabled to false . Else change it to true . Now you also need to change the Text of the Button to read either "Pause" or "Unpause" . Program 5 Complete! App #6 - Windy Day The third app to make is an app that blows leaves around your screen. It will introduce you to random numbers, the canvas and coordinates . Open App Inventor 2 (use the button below) and create a new project. You will need to log in with a Google account. App Inventor 2 In the Palette tab, drag a Canvas from the Drawing and Animation section. A Canvas allows sprites (objects) to move around inside of it. In Properties , change the Height and Width of Canvas to 'Fill parent...' for both, so it fills the whole screen. In the Palette tab, drag over five ImageSprites from the Drawing and Animation section and drop them anywhere inside the canvas. Download the leaf picture with all App Inventor images on the basics page here . Upload the leaf image it in the Media tab. In the Components tab change the names of your ImageSprites to be leaf1, leaf 2 etc. For each leaf sprite, in the Properties tab, change the Picture to the leaf you just uploaded and change Height and Width to 30 pixels each. Finally, in the Palette tab, in the Sensors section, drag over a Clock . Your Viewer should look like the image to the left. X axis Y axis 0 300 500 Now for an explanation of coordinates. Each sprite (leaf) has an x coordinate (horizontal) and a y coordinate (vertical). For example, the leaf in the top right would have coordinates of x = 270 and y = 100. Can you work out approximately what the other leaves coordinates would be? What the code blocks below do is randomise the x and y coordinates for leaf1 every second. The word integer means a whole number . Use this code and add to it to make all 5 leaves randomly change coordinates. Improve Your App Add a pause / unpause button, just like in the Timer app that pauses the timer so that the leaves stop blowing (and starts them blowing around again too). Find a nice picture (maybe of a park?) online and upload it in the Media tab. Set this as the Canvas BackgroundImage . Add an audio file of some whooshing (why not record it yourself?). Program 6 Complete! Task 7 KS3 Home

  • 3.3 - Network Topology - Eduqas GCSE (2020 spec) | CSNewbs

    Learn about the four network topology types - bus, ring, star and mesh - plus advantages and disadvantages of each. Based on the 2020 Eduqas (WJEC) GCSE specification. 3.3: Network Topology Exam Board: Eduqas / WJEC Specification: 2020 + What is a network topology? Network topology refers to layout of computer systems on a network . Devices in a network topology diagram are often called 'nodes' . What are the different types of network topology? Bus Topology The nodes are connected to a bus (a central cable along which all data is transferred across the network). How it works: Data packets are sent along the main cable (sometimes known as the 'backbone') from the source computer to each other system in turn . Each system checks the destination address of the data packets. If the addresses match then the data is accepted otherwise it is passed on to the next system. Terminators are required at both ends of the bus to mark the end of the cable. Advantages: Because of the simple layout, it is easy to attach another system to the main cable without disrupting the whole network . A bus topology is quick to set up once the main cable has been established making it optimal for temporary networks . A bus topology is cost-effective because it usually contains less cabling than other topologies and requires no additional hardware (like a hub or switch). Disadvantages: Poor security as data packets are passed on to each system on the network. Data collisions are likely - this is when two systems attempt to transfer data on the same line at the exact same time. Resending the data wastes time and slows down the network . The main cable will only have a limited length which can become crowded and slows the network speed as more systems are attached. The main cable must also be terminated properly . Ring Topology Computer systems are connected together in a single loop . How it works: Packets are transferred around the ring in one direction , passing from one computer system to the next in a loop . As the packets arrive at each computer system, the computer checks the destination address contained in the data packet to see if it matches its own address. If the addresses match the computer accepts and processes the data packet, otherwise it passes it on to the next system. Advantages: Data collisions are avoided as data packets are transmitted in one direction around the ring. Attaching more systems to a ring topology won't affect the transfer speed (bandwidth ) as much as other layouts like a bus topology because the data is transferred at a consistent speed . Disadvantages: If any system on the network fails then the whole network fails as the loop is broken and data can't be transferred to all systems. To add a new system to a ring topology the network must be temporarily shut down . Star Topology Each computer system is connected to a central device , usually a hub or switch . How it works: Each computer system is connected to the central hub or switch and transfers its data packets there. The hub or switch looks at the destination address and transfers the packets directly to the intended computer. Advantages: A star topology has improved security because data packets are sent directly to and from the hub / switch in the centre and not necessarily all devices like in a bus or ring topology. New systems can be attached directly to the central system so the network doesn't need to be shut down . System failures of attached computers won't usually cause complete network failure. Transfer speeds are generally fast in a star topology as there are minimal network collisions . Disadvantages: Extra hardware (the hub or switch) is required to be purchased, installed and maintained. If the central system (the hub or switch) fails then the whole network will be unusable until the error is fixed. Mesh Topology In a full mesh network, each computer system is connected to every other computer system . There is also a partial mesh network where only some nodes (e.g. a printer) are connected to every other node. How it works: Data packets are transferred to the destination address along the quickest path , travelling from node to node. If a pathway is broken , there are many alternative paths that the packets can take. Advantages: If one cable or system fails then data packets can take an alternative route and still reach the destination address. Because of the large possible number of systems and connections, a mesh topology can usually withstand large amounts of data traffic . New systems can be added to the network without disrupting the entire topology . Disadvantages: Because of the possibly large amount of cables required (especially in a full mesh topology) this network layout can be expensive to install and maintain . Redundant cabling should be avoided - this is when cables are connected between systems that won't ever need to communicate . Q uesto's Q uestions 3.3 - Network Topology: 1. Draw and label diagrams of all four topologies . [12 ] 2a. A school currently uses a bus topology but is considering changing to a ring topology . Describe two advantages and two disadvantages of both topologies. [ 8 ] 2b. An office currently uses a star topology but is considering changing to a mesh topology . Describe two advantages and two disadvantages of both topologies. [ 8 ] 3.2 - Data Packets & Switching Theory Topics 3.4 - Network Hardware & Routing

  • 2.3 - Additional Programming Techniques - OCR GCSE (J277 Spec) | CSNewbs

    Learn about arrays, records and SQL (structured query language) including the SELECT, FROM and WHERE commands. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). Exam Board: OCR Specification: J277 2.3: Additional Programming Techniques Watch on YouTube : String Manipulation File Handling Arrays Subprograms Random Numbers SQL This section of the specification includes programming topics that are outlined in 1.2 (Designing Algorithms). You must have an understanding of more complex programming techniques , such as how to manipulate strings , handle files and use subprograms . The best practice for learning is to try the tasks in the Python pages on this website (see the link to the right). Visit the Python section of CSNewbs ---> Subprograms What is a subprogram? Large programs are often broken down into smaller subprograms (also called subroutines ). Each subprogram focuses on a specific function of the code, helping to decompose a complex problem into more manageable chunks . Defining subprograms A subprogram is defined (identified) using the def command in Python. A program may use many subprograms , which are usually defined at the start of the code . Calling subprograms Running a line of code that includes the name of a subprogram will call (activate) it. When called , the program will run the subprogram code before returning back to the line that called it . Subprograms are only run when called , so depending on decisions made, a program may end without calling every (or any) subroutine. Parameters A parameter is a value that is passed into a subprogram when it is called , allowing the value to be used within the subprogram . A subprogram may not use a parameter , e.g. multiply() , or one parameter , e.g. multiply(num) , or several e.g. multiply(num1,num2) . Any parameters must be identified when the subprogram is defined , e.g. def multiply(num): Return The return command will send a value back to the line the subprogram was called on, allowing it to be used there . For example, the 'quad' subprogram in the example below returns the value of the 'result' variable back to the main program, allowing it to be printed . A subprogram will end either by reaching the last line of code within it, or when it reaches a return command . Subprograms that return a value are called functions . Subprogram example This subprogram is defined using the identifier 'quad ' with a parameter named number . The subprogram is called in the main program, multiplies the number passed in as a parameter by 4 and returns a value back to the main program to be printed. def quad (number): result = number * 4 return result #Main Program number = int ( input ( "Enter a number: " )) print ( "The number quadrupled is" , quad(number)) Enter a number: 5 The number quadrupled is 20 Functions and Procedures There are two types of subprograms . A function is a subprogram that returns a value , using the return command, which allows the value to be used in the line of code the function was called in. The 'divide' function below returns the value of the variable 'total' to the main program to be printed. A procedure is a subprogram that does not return a value . Example of a Procedure def multiply (num): total = num * 2 print ( "The number doubled is" , total) #Main Program num = int ( input ( "Enter a number: " )) multiply(num) Enter a number: 4 The number doubled is 8 Example of a Function def divide (num): total = num / 2 return total #Main Program num = int ( input ( "Enter a number: " )) print ( "The number halved is" , divide(num)) Enter a number: 9 The number halved is 4.5 Advantages of using subprograms Subprograms break a complex program down into smaller parts , making it easier to design and test . Each subroutine can be tested separately and abstraction can be used to simplify a complicated problem . Using subprograms allows code to be easily reused in other programs , as it has already been written , making it quicker to develop new programs or build on existing work. Using subprograms avoids code repetition , as they can be called as many times as necessary . This makes programs shorter and quicker to develop , making them easier to maintain and debug . Work can easily be split up between team members to work on different subprograms at the same time . Array An array is a static data structure that can hold a fixed number of data elements . Each data element must be of the same data type i.e. real, integer, string. The elements in an array are identified by a number that indicates their position in the array. This number is known as the index. The first element in an array always has an index of 0 . You should know how to write pseudo code that manipulates arrays to traverse , add , remove and search for data . The following steps use Python as an example, although Python does not use arrays and uses a similar data structure called a list (that can change in size as the program runs ). See the 8a and 8b Python pages for tasks on how to use lists . What Traversing an Array To traverse (' move through ') an array a for loop can be used to display each data element in order. Example code for traversing: Output: 'Inserting' a value In an array the size is fixed so you cannot insert new values, but you can change the value of elements that already exist. Overwriting the fourth element (Daphne) with a new value (Laura) will change it from Daphne to Laura. Example code for inserting: Output: 'Deleting' a value In an array the size is fixed so you cannot delete values, but you can overwrite them as blank . Overwriting the second element (Shaggy) with a blank space makes it appear deleted. Example code for deleting: Output: Searching an Array For large arrays a for loop is needed to search through each element for a specific value . This example checks each name to see if it is equal to Velma. Example code for searching: Output: Two-Dimensional Array Often the data we want to process comes in the form of a table . The data in a two dimensional array must still all be of the same data type , but can have multiple rows and columns . The two-dimensional array to the right shows the characters from Scooby Doo along with their associated colour and their species. Each value in the array is represented by an index still, but now the index has two values . For example [3] [0] is 'Daphne'. Unless stated in an exam , measure row first , then column . Searching a two-dimensional array: To print a specific data element you can just use the index number like Daphne above. To search for a specific value you will need two for loops , one for the row and another for the values of each row . The example to the right is looking for the value of ' Velma ' and when it is found it prints the associated data from the whole row . Example code for printing: Output: Example code for searching: Output: Records Unlike arrays, records can store data of different data types . Each record is made up of information about one person or thing . Each piece of information in the record is called a field (each row name). Records should have a key field - this is unique data that identifies each record . For example Student ID is a good key field for a record on students as no two students can have the same Student ID. A 2D array may be used to represent database tables of records and fields . SQL SQL (structured query language ) is a language that can be used to search for data in a database . The format of an SQL statement is: SELECT field1, field2, field3… FROM table WHERE criteria Example of an SQL statement using the Cars table: SELECT Make, Colour FROM Cars WHERE Miles > 1000 AND Age > 8 Cars table SQL uses wildcards which are symbols used to substitute characters . The * symbol represents ALL fields . Example: SELECT * FROM Cars WHERE Colour = “blue” < Click the banner to try a self-marking quiz (Google Form) about records and SQL. Q uesto's Q uestions 2.3 - Additional Programming Techniques: 1a. Describe what the following terms mean: subprogram , parameter , function , procedure . [ 2 each ] 1b. Describe three advantages of using subprograms . [ 6 ] 2. Describe the differences between a 1D array , 2D array and record . [ 3 ] 3. A one-dimensional array looks like this: TigerBreeds["Sumatran","Indian","Malayan,"Amur"] Write the code to: a. Print the element with the index of 3. [ 2 ] b. Change Indian to South China. [ 2 ] c. Remove the Amur element. [ 2 ] d. Search through the array for 'Malayan'. [ 2 ] 4a. Use the Cars table above to write the SQL statement to display the make and miles for cars that are grey OR blue . [ 3 ] 4b. Write an SQL statement to display all fields for cars that are 10 years old or less . [ 3 ] 2.2 Data Types Theory Topics 3.1 - Defensive Design

  • OCR CTech IT | Unit 1 | 3.2 - Virtualisation | CSNewbs

    Learn about the benefits and drawbacks of virtualization, as well as about cloud storage and virtual clients. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification. 3.2 - Virtualisation Exam Board: OCR Specification: 2016 - Unit 1 What is virtualisation? Virtualisation is the creation of a virtual version of a device , software , operating system or server . These virtual versions can then be run on a different physical computer system , such as a powerful server . There are many different types of virtualisation . Storage virtualisation combines multiple separate storage devices into acting and appearing like a single , central storage system . Using storage virtualisation improves scalability as further devices can join the storage system if more space is required . It also simplifies the management of storage across the network. Server virtualisation allows one physical server to be divided into and host multiple virtual servers , each running separately . Each virtual server operates independently , handling its own operating system and applications . This allows for resources to be used more effectively and improves the scalability and versatility of the physical server . Client Virtualisation (Virtual Clients) Client virtualisation is when several virtual desktops are run on a single server - think back to the hypervisor from 3.1 . A virtual client is a full desktop environment where the processing happens remotely . For example, where an operating system is managed and hosted centrally but displayed locally on a different computer. These are often known as 'dumb clients ' because the server does the processing for it , meaning it can have minimal resources like a slow processor and little memory / storage . General Benefits & Drawbacks of Virtualisation Benefits of virtualisation: Costs are cheaper in the long-term because money is saved by not purchasing multiple physical devices . Money is also saved due to less cabling and lower power consumption . If set up efficiently, it can be used for higher performance at a lower cost - "Do more with less" . Programs can be tested in a secure environment before main-system deployment. Simplified response to recover after a disaster because only the server needs to be fixed. Drawbacks of virtualisation: If not set up efficiently, users could face serious performance issues , as fewer servers do more work. If a single physical system fails , the impact will be greater . Initial set up is complex , requires technical knowledge and can cost a lot. Easier for hackers to take more information at once as the data is stored in the same place. Benefits of client virtualisation: All data is stored in one central location , making backup and disaster planning easier to manage . The whole system can be managed , secured and updated from the server , rather than from each individual system. Hardware costs will be reduced because the virtual clients do not store or process their own data , meaning they can be of a low spec . Users can have multiple virtual machines and log in remotely (from anywhere with internet access ). Drawbacks of client virtualisation: Users will be unable to work if network connectivity is lost . There is a high strain on the server as the virtual clients do not store or process data themselves . An increased load on the server might result in poor performance for each client, especially with multiple connections . As the data is stored in one location , there are security risks of unauthorised access if the server is not adequately protected . Server Virtual Clients Cloud Technology 'The cloud ' is storage that is accessed through a network , primarily the internet. A cloud server is an example of storage virtualisation as data may be stored across multiple physical devices . There are three different types of cloud storage: Private cloud is where a business will have its own data centre that employees can access. This allows for flexible and convenient data storage and gives the business control over data management and security . Users of the private cloud will not usually have to pay individually for access - but the company will need to spend a lot of money on set up and maintenance . Public cloud uses third-party service providers such as Google Drive or DropBox to provide storage over the internet . Public cloud is usually a pay-for-use service , where businesses will pay for specific amounts that they need. Data management and data security is maintained by the cloud provider and the business is dependent on them providing constant access and deploying effective security measures. Hybrid cloud uses a mix of on-site storage (private cloud) and third-party (public cloud) services . Organisations can move workloads between private and public clouds as their specific needs and costs change . A benefit of hybrid cloud is that it gives an organisation greater flexibility and data storage options. As an example, a company could use on-site or private cloud storage to hold sensitive information and third-party, public cloud services to hold less important data . Q uesto's Q uestions 3.2 - Virtualisation: 1. What is the difference between server and storage virtualisation ? [ 2 ] 2a. What is a virtual client ? [ 1 ] 2b. What are the advantages and disadvantages of client virtualisation ? [ 8 ] 3. Explain any further general advantages and disadvantages of using virtualisation , not covered in your answer to 2b. [4 ] 4. Describe the differences between private , public and hybrid cloud storage. [6 ] 3.1 - Server Types Topic List 3.3 - Network Characteristics

  • Python | Extended Task 3 | CSNewbs

    Test your ability to create a more complex program in Python based on a given scenario. Perfect for students learning GCSE Computer Science in UK schools. Extended Task 3 Hi, Susanna here, I want to make a blackjack-like program that I can play for fun at home in between revising for Computer Science. The aim of my blackjack game is to get as close to 21 as possible with the most number of cards, without going over. So... The user can choose whether to be hit with a new card (a number between 1 and 8) or fold and stop. Each number they are dealt adds up to their total . If the total goes over 21, then they lose . If they bust (when over 21) or folded then their final number and their number of cards is displayed . Blackjack For this task, you will need to create a document and include the following sections (with screenshots where appropriate): An introduction to explain the Purpose of your program . A List of Requirements for a successful program. Screenshots of your code (with comments in your code to show understanding). Testing – Create a plan to show how you will test your program and then explanations of any errors that you found and how they were fixed . An Evaluation of what worked, what didn’t, and how you met each of your requirements from your original list. Also, discuss further improvements that you could have made to improve your program. Example solution: Helpful reminders for this task: Think about the type of loop that you need. Will you need more than one loop? What variables will you need? Remember to use an input . What will you ask the user? How will you use their response? Remember to use ‘import random’ and randint to create a random number . What outputs do you need and when? What should you display… After each hand? At the beginning? At the end? ⬅ Extended Task 2 (Lottery) Extended Task 4 (Vet Surgery) ➡

  • Python | Extended Task 7 | CSNewbs

    Test your ability to create a more complex program in Python based on a given scenario. Perfect for students learning GCSE Computer Science in UK schools. Extended Task 7 'Guess the Number' Multiplayer Game A primary school teacher wants to create a fun activity for their students to play when it is raining and they have to stay inside during break and lunch. Five pupils can play the game at once. Each player chooses a number between 1 and 100 . Then a random number is generated. Whoever was furthest from the random number is out of the game . The four remaining players then pick a new number . This continues with one player being removed each round until only one player is left and they are the winner. Add your own flair and additional features to your program as an extension, including preventing the same number being chosen by multiple players . For this task, you will need to create a document and include the following sections (with screenshots where appropriate): An introduction to explain the Purpose of your program . A List of Requirements for a successful program. Screenshots of your code (with comments in your code to show understanding). Testing – Create a plan to show how you will test your program and then explanations of any errors that you found and how they were fixed . An Evaluation of what worked, what didn’t, and how you met each of your requirements from your original list. Also, discuss further improvements that you could have made to improve your program. Reminders for this task: You will need to use loops to allow the users to enter their numbers. You may wish to use subroutines to decompose the problem into separate rounds. You will need to import the random library to generate a random number in each round. You will need to compare each number to the randomly selected answer using comparison operators such as > and <. There are multiple ways to approach this program, and your solution might look different from the example. Break the problem down and focus on one part at a time. Example solution: Introduction & Round One Round Two ⬅ Extended Task 6 (Word Game)

  • 1.3 - Embedded Systems - OCR GCSE (J277 Spec) | CSNewbs

    Learn about what embedded systems are and examples of them. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). 1.3: Embedded Systems Exam Board: OCR Specification: J277 Watch on YouTube : Embedded Systems Example: A washing machine has a control chip that manages the different program cycles. An embedded system is a computer system built into a larger machine to provide a means of control . Embedded systems perform a specific pre-programmed task which is stored in ROM . An embedded system uses a combination of hardware and software . They perform only specific tasks and often have a small amount of storage and low processing power . Example: A traffic light has a control chip that determines when to change to a green or red light. Q uesto's Q uestions 1.3 - Embedded Software: 1. What is an embedded system ? [3 ] 2a. Give two examples of an embedded system. [ 2 ] 2b. Research and describe another two examples of an embedded system. [ 4 ] 1.2 - CPU Performance 2.1 - Primary Storage Theory Topics

© CSNewbs 2025

The written, video and visual content of CSNewbs is protected by copyright. © 2025
bottom of page