top of page

Search CSNewbs

304 results found with an empty search

  • 1.1a - The CPU - OCR GCSE (J277 Spec) | CSNewbs

    Learn about the components of the Central Processing Unit (CPU) and Von Neumann architecture. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). Exam Board: OCR 1.1a: The CPU Specification: J277 Watch on YouTube : Purpose of the CPU CPU Components Von Neumann Architecture The Central Processing Unit ( CPU ) is the most important component in any computer system. Like many computer components, it is attached to the motherboard . The purpose of the CPU is to process data and instructions by constantly repeating the fetch-execute cycle . CPU Components The Control Unit (CU ) sends control signals to direct the operation of the CPU . Control signals and timing signals are sent to the ALU and other components such as RAM . It also decodes instructions as part of the fetch-execute cycle . ALU stands for ‘ Arithmetic and Logic Unit ’. It performs simple calculations and logical operations . A register is a temporary storage space for one instruction or address . Different registers are used during the fetch-execute cycle . Cache memory is used to temporarily store data that is frequently accessed . Cache memory is split into different levels . Cache is slower to access than the registers but much faster than RAM . Computer Architecture The way a computer is designed and structured is known as its architecture . The most common type of computer architecture is Von Neumann . It is named after the mathematician John Von Neumann (pronounced Von Noy-man) Von Neumann Architecture A computer with Von Neumann architecture stores both program instructions and data in the same memory (RAM ) and in the same format (in binary ). Instructions (technically called the opcode ) and data (technically called the operand ) are not the same . An instruction is an action to perform and data is the value to be used. For example with the command 'ADD 43 ', ADD is the instruction and 43 is the data . Von Neumann architecture also contains the key CPU components of a control unit , arithmetic logic unit (ALU ), registers and cache memory . Q uesto's Q uestions 1.1a - The CPU: 1a. What does 'CPU ' stand for ? [1 ] 1b. What is the purpose of the CPU ? [ 2 ] 2. Draw a diagram of the CPU , and l abel the four main components . [ 4 ] 3. Describe the purpose of: a. The Control Unit [ 2 ] b. The ALU [ 2 ] c. The registers [ 2 ] d. Cache memory [ 2 ] 4a. Describe the key feature of Von Neumann architecture . [ 2 ] 4b. Explain how an instruction is different to data . [ 2 ] 1.1b - Registers & FE Cycle Theory Topics

  • 3.2b - Protocols & Layers - OCR GCSE (J277 Spec) | CSNewbs

    Learn about the different protocols used on networks - HTTP, HTTPS, TCP, IP, FTP and SMTP. Also learn about protcol layers in the 4-layer TCP/IP model. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). 3.2b: Protocols & Layers Exam Board: OCR Specification: J277 Watch on YouTube : IP & MAC Addresses Protocols & Standards Common Protocols Protocol Layers Protocols A protocol is a set of rules that allow devices on a network to communicate with each other . TCP / IP (Transmission Control Protocol / Internet Protocol) TCP / IP is actually two separate protocols that combine together. TCP is a protocol that allows packets to be sent and received between computer systems. It breaks the data into packets and reorders them back into the original data at the destination. IP is a protocol in charge of routing and addressing data packets . This ensures data packets are sent across networks to the correct destination . It is also an addressing system - every device on a network is given a unique IP address so data packets can be sent to the correct computer system. HTTP is used to transfer web pages over the Internet so that users can view them in a web browser . All URLs start with either HTTP or HTTPS (e.g. https://www.csnewbs.com). HTTPS is a more secure version of HTTP that works with another protocol called SSL ( Secure Sockets Layer ) to transfer encrypted data . You should see a padlock symbol in the URL bar if your connection to that website is secure. HTTP/HTTPS (Hypertext Transfer Protocol) Transfer Protocols FTP ( File Transfer Protocol ) is used to transfer files across a network. It is commonly used to upload or download files to/from a web server . SMTP ( Simple Mail Transfer Protocol ) is a protocol used to send emails to a mail server and between mail servers . POP ( Post Office Protocol ) and IMAP (Internet Message Access Protocol ) are both protocols for receiving and storing emails from a mail server. POP will delete an email from the email server once it has been downloaded to a device . Pop! IMAP syncs the message with an email server so it can be accessed by different devices . IP Address & MAC Address There are two versions of IP addressing currently used - IPv4 and IPv6 . IPv4 is a 32-bit address , represented in denary , that allows for over 4 billion unique addresses . It has four 8-bit segments of denary values (from 0 to 255) separated by full stops . IPv4 example: 145.13.218.102 IPv6 is a 128-bit address , represented in hexadecimal , that allows for an undecillion unique addresses . It has eight 16-bit segments of four hexadecimal values (0000 - FFFF), separated by colons . IPv6 example: 736E:1029:A4B3:902D:77B2:72FF:AE62:0912 A MAC address is a unique hexadecimal number assigned to each network interface card/controller inside a networked device such as a router or laptop . A MAC address is a 48-bit address made up of six 8-bit pairs in hexadecimal , separated by dashes . While an IP address may change , the MAC address can’t be changed . MAC stands for Media Access Control . Network Interface Card (NIC) MAC example: 19-C2-D1-47-AA-38 Networking Standards Networking standards are rules that allow computer systems to communicate across networks . Standards have been created to ensure devices can exchange data and work together by interpreting signals in the same way , regardless of the manufacturer . TCP/IP Stack & Layers What is TCP/IP? TCP/IP (Transmission Control Protocol / Internet Protocol ) is a set of protocols that operate on different layers . These two protocols are used together to allow computers to communicate on a network . What is a protocol layer? A layer is a division of network functionality - each layer provides a specific function to assist the transmission of the data that is being sent. TCP/IP is split into four layers (named Application , Transport , Internet and Link ). Important Note: You do not need to know any layer names or the purpose of any specific layers in the OCR GCSE J277 specification , just what layers are and why they’re used . Why are protocol layers used? Layers are self-contained , so they allow different developers to concentrate on one aspect of the network at a time . A layer can be taken out and edited without affecting other layers . Protocol layers are used to visualise the different parts of a network , as each of the four layers of TCP/IP has a specific role and is associated with different protocols . Protocols are broken down into well-defined , specific layers to simplify design , making it easier to identify errors (known as troubleshooting ). Each layer uses specific protocols , so layering ensures these protocols are applied in a specific order . This process uses abstraction and layers only communicate with adjacent layers for easy compatibility . Q uesto's Q uestions 3.2b - Protocols & Layers: 1. Describe each of the following protocols . It might be helpful to also draw an icon or small diagram for each one: a. TCP [ 2 ] b. IP [ 2 ] c. HTTP & HTTPS [ 3 ] d. FTP [ 2 ] e. SMTP [ 2 ] f. POP3 & IMAP [ 2 ] 2. State which protocol would be used in the following scenarios : a. Transferring a music file to a friend over the internet. [ 1 ] b. Sending an email to a family member in America. [ 1 ] c. Using a webpage to enter a password securely. [ 1 ] d. Receiving an email from a bank. [ 1 ] 3a. What are networking standards ? [ 2 ] 3b. What is TCP/IP ? [ 2 ] 3c. What is a protocol layer ? [ 2 ] 3d. Give at least two reasons why protocols are split into layers . [ 4 ] 3.2a - Wired & Wireless Networks Theory Topics 4.1 - Security Threats

  • 3.5 - Protocols - Eduqas GCSE (2020 spec) | CSNewbs

    Learn about the different protocols used on networks - HTTP, HTTPS, TCP, IP, Ethernet, WiFi, FTP and SMTP. Based on the 2020 Eduqas (WJEC) GCSE specification. 3.5: Protocols Exam Board: Eduqas / WJEC Specification: 2020 + What is a protocol? A protocol is a set of rules that allow devices on a network to communicate with each other . TCP / IP is actually two separate protocols that combine together. TCP / IP (Transmission Control Protocol / Internet Protocol) TCP is a protocol that allows packets to be sent and received between computer systems. It breaks the data into packets and reassembles them back into the original data at the destination. IP is a protocol in charge of routing and addressing data packets . This ensures data packets are sent across networks to the correct destination . It is also an addressing system - every device on a network is given a unique IP address so data packets can be sent to the correct computer system. HTTP is used to transfer web pages over the Internet so that users can view them in a web browser . All URLs start with either HTTP or HTTPS (e.g. https://www.csnewbs.com). HTTPS is a more secure version of HTTP that works with another protocol called SSL ( Secure Sockets Layer ) to transfer encrypted data . You should see a padlock symbol in the URL bar if your connection to that website is secure. HTTP/HTTPS (Hypertext Transfer Protocol) Ethernet is a protocol for wired connections . Ethernet is used at both the data link and physical layers to describe how network devices can format data packets for transmission. WiFi is the main standard for wireless connections . WiFi is actually a brand name that uses a protocol called IEEE 802.11 . Another wireless standard is Bluetooth , for short-range data transfer. Connection Protocols Transfer Protocols FTP ( File Transfer Protocol ) is used to transfer files across a network. It is commonly used to upload or download files to/from a web server . SMTP ( Simple Mail Transfer Protocol ) is a protocol used to send emails to a mail server and between mail servers . Q uesto's Q uestions 3.5 - Protocols: 1. Describe each of the following protocols . It might be helpful to also draw an icon or small diagram for each one: a. TCP [ 2 ] b. IP [ 2 ] c. HTTP & HTTPS [ 3 ] d. WiFi (802.11) [ 1 ] e. Ethernet [ 2 ] f. FTP [ 2 ] g. SMTP [ 2 ] 2. State which protocol would be used in the following scenarios : a. Transferring a music file to a friend over the internet. [ 1 ] b. Sending an email to a family member in America. [ 1 ] c. Using a wireless connection to play a mobile game. [ 1 ] d. Using a webpage to enter a password securely. [ 1 ] e. Watching a video on YouTube. [1 ] 3.4 Network Hardware & Routing Theory Topics 3.6 - 7 Layer OSI Model

  • The CPU | Key Stage 3 | CSNewbs

    Learn about the Central Processing Unit (CPU) and factors such as clock speed. Learn about components within the CPU including the ALU and control unit. The CPU What is the CPU? The CPU CPU stands for C entral P rocessing U nit . The CPU is considered the brain of the computer because it is used to process data and instructions , just like a human brain . Every single type of computer needs a CPU , from desktop computers to laptops , game consoles , even smart TVs and smart watches . The CPU plugs directly into the motherboard in a special socket . What does the CPU do? The CPU works in a cycle (called the FDE cycle ), which it repeats up to billions of times a second . In the FDE cycle , the CPU first f etches instructions from RAM. Next, the CPU d ecodes (understands ) the instructions and finally e xecutes (runs ) them. RAM (Random Access Memory) Instructions CPU (Central Processing Unit) What is clock speed? The clock speed is how many instructions a CPU can carry out per second . Clock speed is measured in gigahertz (GHz ), where 1 GHz = 1 billion cycles per second . The higher the clock speed , the faster the CPU will run , as more instructions can be processed per second . What are the four components of the CPU? The Control Unit (CU ) sends control signals to direct the operation of the CPU . It also decodes instructions as part of the FDE cycle . ALU stands for Arithmetic Logic Unit . It performs simple calculations and compares data . The registers are temporary storage spaces for instructions inside the CPU. They are used in the FDE cycle . Cache memory stores frequently accessed data that the CPU needs to access at very high speeds . What is overclocking and underclocking? Typical clock speed: 3.5 GHz 3.9 GHz 3.3 GHz Overclocking is when the computer's clock speed is increased higher than the recommended speed. This will make the computer perform faster but it can lead to overheating and could damage the computer . Underclocking is when the computer's clock speed is decreased lower than the recommended speed. This will make the computer perform slower but will increase the lifespan of the computer . KS3 Home

  • Greenfoot Tutorial | CSNewbs

    A tutorial to understand how to create a game in Greenfoot. A simple step-by-step guide and walkthrough featuring all code needed for the Eduqas GCSE 2016 specification. A Tutorial to Creating a Greenfoot Game Greenfoot Home Greenfoot is software that uses the programming language Java to make simple games. This is called object-orientated programming (OOP ) because objects are coded to interact in a visual environment. Work your way through the following tutorial to create a game similar to one required in the WJEC/Eduqas 2016 specification Component 2 exam . Topic Links: Starting from Scratch & Populating the World Move with Arrow Keys Move Randomly & Bounce on Edge Remove Objects Play Sounds The Counter Extension Ideas According to the 2016 specification, in the Eduqas exam, you will use Greenfoot version 2.4.2 , despite the fact that Greenfoot is now on version 3.6.1 . This means that some newer code won't work! This guide here will work on version 2.4.2 . Just make sure you are also using version 2.4.2 - see the download page for help. Watch on YouTube:

  • 1.2 - CPU Performance - OCR GCSE (J277 Spec) | CSNewbs

    Learn about the three factors that affect computer performance - cache memory, clock speed and the number of cores. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). 1.2: CPU Performance Exam Board: OCR Specification: J277 Watch on YouTube : Clock Speed Cache Memory Number of Cores The performance of a computer system is affected by three main factors: Cache Memory What is cache memory? Cache memory is temporary storage for frequently accessed data . 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. 8GB instead of 4GB) should have a higher performance because repeatedly used instructions can be stored and accessed faster . What is the limitation of cache memory? Cache memory is costly, so most computers only have a small amount . 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? Default 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.2 - CPU Performance: Cache Size & Levels 1a. What is cache memory ? [ 2 ] 1b. Describe two ways that more c ache memory will mean performance is higher . [ 4 ] 1c. 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.1b - Registers & FE Cycle 1.3 - Embedded Systems Theory Topics

  • OCR CTech IT | Unit 1 | 2.3 - Utility Software | CSNewbs

    Learn about different types of utility software including firewall, anti-virus, defragmenter, compressor and backup software. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification. 2.3: Utility Software Exam Board: OCR Specification: 2016 - Unit 1 What is utility software? Utility software are dedicated programs used for the maintenance and organisation of a computer system. Antivirus Software Antivirus software is used to locate and delete viruses on a computer system. The antivirus scans each file on the computer and compares it against a database of known viruses . Files with similar features to viruses in the database are identified and deleted . There are thousands of known viruses but new ones are created each day by attackers so antivirus software must be regularly updated to keep systems secure. Other roles of an antivirus: Checking all incoming and outgoing emails and their attachments . Checking files as they are downloaded . Scanning the hard drive for viruses and deleting them . Firewall A firewall manages incoming and outgoing network traffic . Each data packet is processed to check whether it should be given access to the network by examining the source and destination address . Unexpected data packets will be filtered out and not accepted to the network. Defragmentation As files are edited over time they will become fragmented - this is when the file is split into parts that are stored in different locations on the hard disk drive . Files that are fragmented take longer to load and read because of the distance between the fragments of the file. Defragmentation software is used to rearrange the file on the hard disk drive so that all parts are together again in order. Defragmentation improves the speed of accessing data on the hard disk drive. Compression Compression is used to decrease the size of a file . This is beneficial as more files can be stored on a storage device if the size has been reduced. Compressed files can be transferred faster across a network because they are smaller in size . Monitors, Managers & Cleaners Other roles of a firewall include: Blocking access to insecure / malicious web sites . Blocking certain programs from accessing the internet . Blocking unexpected / unauthorised downloads . Preventing specific users on a network accessing certain files . Monitoring network ports . System monitors check the resources of a computer and display how much CPU time and memory current applications are using. Task managers allow a user to close processes and applications if they have stopped responding or if one is using too many resources. Press Ctrl + Alt + Delete on any Windows computer to open Windows Task Manager which is a system monitor and task manager tool. A disk cleaner is used to scan a hard disk drive and remove unused files . This is used to free up space on the hard drive. A disk scanner will scan a hard disc for any errors and attempt to repair them . Backing Up Data A backup is a copy of data that can be used if the original data is corrupted or lost . Backups of all data should be made regularly and stored in an alternative location . Alternatively, imaging (also known as disk cloning ) creates an identical image of a storage drive to be stored in a different location . Q uesto's Q uestions 2.3 - Utility Software: 1. What is the purpose of utility software ? [1 ] 2a. Describe how antivirus software works. [ 2 ] 2b. Describe 3 further roles of antivirus software . [ 3 ] 3a. What is the purpose of a firewall ? [ 2 ] 3b. Describe 3 further roles of a firewall . [ 3 ] 4a. Describe what is meant by defragmentation . [ 2 ] 4b. Explain why defragmentation software is used . [ 2 ] 5. Describe 2 benefits of using compression . [ 2 ] 6a. Explain why system monitor / task management software could be used . [ 2 ] 6b. Explain the purpose of disk cleaners and disk scanners . [ 2 ] 7a. Explain what a backup is and why they are are important. [ 2 ] 7b. Describe what imaging is. [ 2 ] 2.2 - Applications Software Topic List 2.4 - Operating Systems

  • Python | Section 6 Practice Tasks | CSNewbs

    Test your understanding of for loops and while loops in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python - Section 6 Practice Tasks Task One: Odd Numbers Use a for loop to print all odd numbers between 50 and 70 . You will need to use three values in the range brackets, including a step . Requirements for full marks: A comment at the start to explain what a for loop is. Use just two lines of code. Example solution: 51 53 55 57 59 61 63 65 67 69 Task Two: Fish Rhyme Use two separate for loops and some additional print lines to output this nursery rhyme: "1, 2, 3, 4, 5, Once I caught a fish alive, 6, 7, 8, 9, 10 then I let it go again" in the format shown . Requirements for full marks: Two for loops and two additional print lines (6 lines total). Example solution: 1 2 3 4 5 Once I caught a fish alive. 6 7 8 9 10 Then I let it go again. Task Three: Username & Password Create a program using a while loop that keeps asking a user to enter a username and a password until they are both correct . It may be easier to use a while True loop . You will need to use the and command in an if statement within the loop. Requirements for full marks: A comment at the start to explain what a while loop is. Example solution: Enter username: Ben43 Enter password: hamster Incorrect, please try again. Enter username: Ben44 Enter password: ben123 Incorrect, please try again. Enter username: Ben43 Enter password: ben123 Correct Correct login. Welcome Ben43 Task Four: Colour or Number Use a while True loop to let the user enter either A , B or C . A lets them guess a secret colour . B lets them guess a secret number . C breaks the loop , ending the program. Example solution: Enter A to guess a colour, B to guess a number, C to quit: A Guess the colour: green Incorrect! Enter A to guess a colour, B to guess a number, C to quit: A Guess the colour: pink Correct! Enter A to guess a colour, B to guess a number, C to quit: B Guess the number: 4 Incorrect! Enter A to guess a colour, B to guess a number, C to quit: C Quitting program... ⬅ 6b - W hile Loops 7a - Procedures ➡

  • Python | 4a - If Statements | CSNewbs

    Learn how to use if statements in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python 4a - If Statements If Statements Selection is one of three constructs of programming , along with Sequence (logical order) and Iteration (loops). An if statement is a conditional statement that performs a specific action based on conditional values. Essentially, if thing A is true , then thing B will happen . If the user answers yes to the window question, then an appropriate statement is printed. Double equals stands for ‘is equal to ‘. The colon stands for THEN and the line after an if statement must be indented (press tab key once). answer = input ( "Is the window open? " ) if answer == "yes" : print ( "It's chilly in here!" ) Is the window open? yes It's chilly in here! But what if the window is not open? At the moment nothing will happen if you type no: Is the window open? no The elif command stands for else if . Essentially: If thing A is true then do thing B, else if thing C is true then do thing D: But what about any other answer than yes or no? The else command will submit a response if the value is anything else. The if and elif commands have a colon at the end, but else has it at the start. Also, else does not need to be on a new line. answer = input ( "Is the window open? " ) if answer == "yes" : print ( "It's chilly in here!" ) elif answer == "no" : print ( "It's quite hot in here!" ) answer = input ( "Is the window open? " ) if answer == "yes" : print ( "It's chilly in here!" ) elif answer == "no" : print ( "It's quite hot in here!" ) else : print ( "I'm not sure what you mean." ) Is the window open? no It's quite hot in here! Is the window open? banana I'm not sure what you mean. If Statements Task 1 ( Left or Right?) Use an input line to ask the user whether they want to turn left or right . Print a sentence of your choice if they chose left and a different sentence if they chose right . Include an else statement in case the user doesn't input left or right. Example solutions: There is a path ahead. Do you turn left or right? left The path turns and twists until it reaches a cliff. Dead end! There is a path ahead. Do you turn left or right? right A snake slithers across the path and bites your leg. Oh no! There is a path ahead. Do you turn left or right? backwards That's not an option! Nested If Statements Complex programs may require you to have if statements within if statements - when programming, one thing inside another is known as nesting . You must make sure that the related if , elif and else statements line up with each other . Use the tab key to indent a line. outer if inner if weather = input ( "What is the weather like today? " ) if weather == "sunny" : sunny = input ( "How hot is it? " ) if sunny == "very hot" : print ( "Take some sunglasses with you!" ) elif sunny == "cool" : print ( "Maybe take a jacket just in case?" ) else : print ( "Enjoy the sunshine!" ) elif weather == "rainy" : print ( "Take an umbrella!" ) else : print ( "Have a good day!" ) = What is the weather like today? rainy Take an umbrella! = What is the weather like today? sunny How hot is it? cool Maybe take a jacket just in case? = What is the weather like today? snowy Have a good day! = What is the weather like today? sunny How hot is it? very hot Take some sunglasses with you! If Statements Task 2 ( Nested Ifs) Use the weather program above as an example to help you write your own program with a nested if for at least one option. Be careful to have your nested if's if, elif and else statements in line with each other. Your program doesn't have to be about juice. Example solutions: Would you like orange, apple or tomato juice? orange Would you like your orange juice smooth or with bits? smooth One smooth orange juice coming up! Would you like orange, apple or tomato juice? orange Would you like your orange juice smooth or with bits? bits A pulpy orange juice is on its way! Would you like orange, apple or tomato juice? tomato Yuck, you can't be serious? Using Selection with Numbers Comparison operators such as > (greater than ) > = (greater than or equal to ) < (less than ) and < = (less than or equal to ) can be used with if statements. Logical operators such as and and or can also be used - more about them in section 4c . When comparing a variable's value to a specific number, such as 50, don't forget to use double equals ( == ) . Python Comparison Operators score = int ( input ( "Enter the maths test score: " )) if score == 50: print ( "You scored top marks!" ) elif score >= 40 and score < 50: print ( "You scored a great grade!" ) elif score >= 20 and score < 40: print ( "You did okay in the test." ) else : print ( "You have to try harder next time!" ) = Enter the maths test score: 50 You scored top marks! = Enter the maths test score: 43 You scored a great grade! = Enter the maths test score: 20 You did okay in the test. = Enter the maths test score: 13 You have to try harder next time! If Statements Task 3 ( Fastest lap) A racing video game has a challenging track that players try to get a quick lap on. The current fastest lap time is 37 seconds . Ask the player to enter their lap time and print a response based on their input . You need individual responses for the following inputs: Faster than 37 seconds. Between 37 seconds and 59 seconds. Between 60 seconds and 90 seconds. Slower than 90 seconds. Example solutions: Enter your lap time: 35 You have set a new record!!! Enter your lap time: 59 You did well this time! Enter your lap time: 83 A little bit slow this time! Enter your lap time: 110 Were you even trying!?! Hurry up! Not Equal To The opposite of equal to ( == ) is not equal to ( != ). != is often used with while loops to repeat code while an input is not what is expected , for example repeatedly asking for a password while the input is not equal to "fluffythecat123". The code below uses != for an incorrect answer (although it could easily be re-written to use == for a correct answer). answer = input ( "What is the capital of Eritrea? " ) if answer != "Asmara" : print ( "That is incorrect! It is Asmara." ) else : print ( "You got it right!" ) = What is the capital of Eritrea? Asmara You got it right! = What is the capital of Eritrea? Windhoek That is incorrect! It is Asmara. If Statements Task 4 ( True or False? ) Come up with your own true or false question that the user has to respond to. Depending on their answer , print whether they got it right or wrong . You may want to use an if statement with == for a correct answer or != for an incorrect answer , there's multiple ways to write this program. Example solutions: There are 140 million miles between Earth and Mars. TRUE or FALSE? TRUE That is correct! It is really that far! There are 140 million miles between Earth and Mars. TRUE or FALSE? FALSE You got it wrong, there really are 140 million miles between us! ⬅ Section 3 Practice Tasks 4b - Mathematical Operators ➡

  • 2.1 - Primary Storage - OCR GCSE (J277 Spec) | CSNewbs

    Learn what an embedded system is and about different examples of embedded systems. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). 2.1: Primary Storage (Memory) Exam Board: OCR Specification: J277 Watch on YouTube : Primary Storage RAM and ROM Virtual Memory Primary vs Secondary Storage Storage in a computer system is split into two categories: Primary Storage: Very quick because it is directly accesse d by the CPU . Typically smaller in storage size . Sometimes called ‘main memory’ . Includes RAM and ROM . Volatile vs Non-Volatile Storage Storage is also split into two types - volatile and non-volatile . Volatile storage is temporary - data is lost whenever the power is turned off . Example: RAM Non-volatile storage saves the data even when not being powered . Data can be stored long-term and accessed when the computer is switched on . Example: ROM Why do Computers need Primary Storage? Primary storage is low-capacity , internal storage that can be directly accessed by the CPU . Program instructions and data must be copied from the hard drive into RAM to be processed by the CPU because primary storage access speeds are much faster than secondary storage devices like the hard drive. Types of Primary Storage (Memory) Random Access Memory (RAM) Read-Only Memory (ROM) RAM is volatile (temporary) storage that stores all programs that are currently running . RAM also stores parts of the operating system to be accessed by the CPU. RAM is made up of a large number of storage locations, each can be identified by a unique address . ROM is non-volatile storage that cannot be changed . ROM stores the boot program / BIOS for when the computer is switched on. The BIOS then loads up the operating system to take over managing the computer. RAM ( R andom A ccess M emory) ROM ( R ead O nly M emory) Virtual Memory Programs must be stored in RAM to be processed by the CPU . Even if there is insufficient space in RAM for all programs the computer can use the hard disk drive (HDD ) as an extension of RAM - this is called virtual memory . If new data is needed to be stored in RAM then unused data in RAM is moved to the hard drive so the new data can be transferred into RAM . If the original data is required again, it can be moved back from virtual memory into RAM . Using virtual memory is beneficial because it allows more programs to be run at the same time with less system slow down . Secondary Storage: ( Section 2.2 ) Slower because it is not directly accessed by the CPU . Typically larger in storage size . Used for the long-term storage of data and files because it is non-volatile . Includes magnetic , optical and solid state storage. Q uesto's Q uestions 2.1 - Primary Storage (Memory): 1. Describe the differences between primary and secondary storage . [ 6 ] 2. Explain the difference between volatile and non-volatile storage . State an example of both types. [ 4 ] 3. Explain why the computer requires primary storage . [ 2 ] 4. For each type of memory below, describe it and state what information is stored within it: a . Random Access Memory (RAM) [3 ] b. Read-Only Memory (ROM) [ 3 ] c. Virtual memory [ 3 ] 1.3 - Embedded Systems Theory Topics 2.2 - Secondary Storage

  • 9.1 - IDE Tools - Eduqas GCSE (2020 Spec) | CSNewbs

    Learn about the tools of an integrated development environment (IDE) including the editor, debugger, library, trace, memory inspector and error diagnostics. Based on the 2020 Eduqas (WJEC) GCSE specification. 9.1: IDE Tools Exam Board: Eduqas / WJEC Specification: 2020 + An IDE (Integrated Development Environment ) provides programmers with the following facilities (tools ) to help create programs : Editor The editor is software that allows a programmer to enter and edit source code . Editor features may include: Automatic formatting (e.g. automatic indentation). Automatic line numbering (this helps to identify exactly where an error has occurred). Automatic colour coding (e.g. Python turns loop commands orange and print commands purple). Statement completion (e.g. offering to auto-complete a command as the user is typing.) Libraries A library is a collection of commonly used functions and subprograms that can be linked to a program . For example, Python can import functions from its code library including random or time commands). Libraries must be linked to the main program using a linker . Linker Links together pre-compiled code from software libraries . For example, the import random command in Python links to the random library. Loader Pre-compiled code is loaded into RAM to be executed. Code Optimisation The code is optimised so it is fast , efficient and uses as little of the computer's resources as possible. Debugger Identifies errors in the code with the exact line of the error to help fix the problem . Break point The programmer selects a specific line and the program is paused once it reaches it. Variable values at that point are shown . Variable Watch cost Displays the current value of a selected variable . A variable can be watched line-by-line to see how the value changes . Trace Memory Inspector Logs the values of variables and outputs of the program a s the code is executed line by line . Displays the contents of a section of memory and how it is being used by the program . Error Diagnostics Displays information about an error when it occurs, such as the line it occurred on and the error type (e.g. syntax or runtime). This helps the programmer to fix the error . Specific errors can be detected such as a syntax error . See 10.3 . Compilers & Interpreters Both tools convert the source code written by a programmer into machine code to be executed by the CPU. A compiler converts the entire source code into executable machine code at once . After compilation, the program can be run again without having to recompile each time. An interpreter converts source code into machine code line by line . An interpreter must reinterpret the code each time the program is required to run . See 10.1 for both tools. Subroutines & Functions A subroutine is a section of code that can be re-used several times in the same program. There are two types of subroutines: A procedure just executes commands , such as printing something a certain number of times. A function can receive data from the main program (called a parameter ) and return a value upon completion. Subroutines (procedures and functions) are designed to be repeated and have three key benefits: Subroutines make programs easier to read and design . They reduce the duplication of code . Makes it is easier to debug a program. Q uesto's Q uestions 9.1 - IDE Tools: 1. Describe the purpose of each type of IDE facility : a. Editor b. Interpreter c. Compiler d. Linker e. Loader f. Debugger g. Break point h. Variable Watch i. Trace j. Memory Inspector k. Error Diagnostics [ 2 each ] 8.5 - Validation & Verification Theory Topics 10.1 - Translators

  • Python | 9b - Number Handling | CSNewbs

    Learn how to handle numbers in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python 9b - Number Handling Rounding Numbers The round() command is used to round a value to a certain number of decimal places . Type your variable into the round command brackets, add a comma and state the number of decimal places to round to. Fixed Decimal Places (Currency) The round function will remove any trailing 0s , for example 30.1032 will become 30.1 even if you specified to round to 2 decimal places . Instead, you can use an f -string and write :.2f after a bracketed variable to use exactly 2 decimal places . The number can be changed from 2. books = int ( input ( "How many books would you like to buy? " )) total = books * 3.99 print ( f"The total is £ {total:.2f} - Thanks for your order!" ) How many books would you like to buy? 10 The total is £39.90 - Thanks for your order! How many books would you like to buy? 100 The total is £399.00 - Thanks for your order! Practice Task 1 Ask the user to enter any large number. Ask the user to enter another large number. Divide the two numbers and print the answer to 3 decimal places. Example solution: Using Numbers as Strings The following techniques all require the integer to be converted into a string first using the str command. Just like a string, you can shorten a variable to only display a certain length . Remember that Python starts at zero . You can select a specific digit in the same manner as when selecting characters in a string. If you want to use your variable as an integer again later you would need to convert it from a string to an integer using the int command. Again, reversing a number is the same as reversing a string. You can also use other string handling methods such as .startswith() or .endswith() Practice Task 2 Ask the user to enter a 10 digit number. Select the 2nd and 8th digits and add them together. Print the total. Example solution: ⬅ 9a - String Handling Section 9 Practice Tasks ➡

© CSNewbs 2026

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