Search CSNewbs
282 results found with an empty search
- 1.4 - Secondary Storage - Eduqas GCSE (2020 spec) | CSNewbs
Learn about the four types of secondary storage - magnetic, optical, solid-state and cloud. Also, learn about the data storage units from bit to yottabyte. Based on the 2020 Eduqas (WJEC) GCSE specification. 1.4: Secondary Storage & Data Units Exam Board: Eduqas / WJEC Specification: 2020 + Secondary storage (also known as backing storage ) is non-volatile storage used to save and store data that can be accessed repeatedly. Secondary storage is not directly embedded on the motherboard (and possibly even external ) and therefore further away from the CPU so it is slower to access then primary storage . Storage Characteristics: CAPACITY : The maximum amount of data that can be stored. DURABILITY : The physical strength of the device, to withstand damage. PORTABILITY : How easy it is to carry the device around. ACCESS SPEED : How quickly data on the device can be read or edited . COST : The average price it costs to purchase a storage device. Magnetic Storage Optical Storage A magnetic hard disk drive (HDD ) is the most common form of secondary storage within desktop computers. A read/write head moves nanometres above the disk platter and uses the magnetic field of the platter to read or edit data. An obsolete (no longer used) type of magnetic storage is a floppy disk but these have been replaced by solid state devices such as USB sticks which are much faster and have a much higher capacity. Another type of magnetic storage that is still used is magnetic tape . Magnetic tape has a high storage capacity but data has to be accessed in order (serial access ) so it is generally only used by companies to back up or archive large amounts of data . Optical storage uses a laser to project beams of light onto a spinning disc, allowing it to read data from a CD , DVD or Blu-Ray . This makes optical storage the slowest of the four types of secondary storage. Disc drives are traditionally internal but external disc drives can be bought for devices like laptops. Magnetic Storage Characteristics: ✓ - Large CAPACITY and cheaper COST per gigabyte than solid state . X - Not DURABLE and not very PORTABLE when powered on because moving it can damage the device. X - Slow ACCESS SPEED but faster than optical storage . Optical Storage Characteristics: X - Low CAPACITY : 700 MB (CD ), 4.7 GB (DVD ), 25 GB (Blu-ray ). X - Not DURABLE because discs are very fragile and can break or scratch easily. ✓ - Discs are thin and very PORTABLE . Also very cheap to buy in bulk. X - Optical discs have the Slowest ACCESS SPEED . Magnetic Disks are spelled with a k and Optical Discs have a c. Solid State Storage Cloud Storage There are no moving parts in solid state storage. SSD s (Solid State Drives ) are replacing magnetic HDDs (Hard DIsk Drives) in modern computers and video game consoles because they are generally quieter , faster and use less power . A USB flash drive ( USB stick ) is another type of solid state storage that is used to transport files easily because of its small size. Memory cards , like the SD card in a digital camera or a Micro SD card in a smartphone , are another example of solid state storage. When you store data in 'the cloud', using services such as Google Drive or Dropbox, your data is stored on large servers owned by the hosting company . The hosting company (such as Google) is responsible for keeping the servers running and making your data accessible on the internet . Cloud storage is very convenient as it allows people to work on a file at the same time and it can be accessed from different devices. However, if the internet connection fails , or the servers are attacked then the data could become inaccessible . Solid State Characteristics: X - High CAPACITY but more expensive COST per gigabyte than magnetic . ✓ - Usually DURABLE but cheap USB sticks can snap or break . ✓ - The small size of USB sticks and memory cards mean they are very PORTABLE and can fit easily in a bag or pocket. ✓ - Solid State storage has the fastest ACCESS SPEED because they contain no moving parts . Cloud Storage Characteristics: ✓ - Huge CAPACITY and you can upgrade your subscription if you need more storage. ✓ / X - Cloud storage is difficult to rank in terms of PORTABILITY , DURABILITY and ACCESS SPEED because it depends on your internet connection. A fast connection would mean that cloud storage is very portable (can be accessed on a smartphone or tablet) but a poor connection would make access difficult . ✓ - Cloud storage is typically free for a certain amount of storage. Users can then buy a subscription to cover their needs - Dropbox allows 2 GB for free or 2 TB for £9.99 a month. Data Storage Units 0 / 1 All data in a computer system is made up of bits . A single bit is a 0 or a 1 . 4 bits (such as 0101 or 1101) is called a nibble . 1,024 bytes is called a kilobyte . A kilobyte can store a short email . A 8 bits is called a byte . A byte can store a single character . 1,024 kilobytes is called a megabyte . A megabyte can store about a minute of music . 1,024 megabytes is called a gigabyte . A gigabyte can store about 500 photos . 1,024 terabytes is called a petabyte . A petabyte can store about 1.5 million CDs . 1,024 gigabytes is called a terabyte . A terabyte can store about 500 hours of films . More data storage units: 1,024 petabytes is called a exabyte . 1,024 exabytes is called a zettabyte . 1,024 zettabytes is called a yottabyte . Q uesto's Q uestions 1.4 - Secondary Storage: 1. Rank magnetic , optical and solid-state storage in terms of capacity , durability , portability , speed and cost . For example, magnetic has the highest capacity , then solid-state, then optical. This could be completed in a table . [15 ] 2. Justify which secondary storage should be used in each scenario and why it is the most appropriate: a. Sending videos and pictures to family in Australia through the post . [ 2 ] b. Storing a presentation to take into school . [ 2 ] c. Storing project files with other members of a group to work on together . [ 2 ] d. Backing up an old computer with thousands of files to a storage device. [ 2 ] 3. Put the following data storage units in order from smallest to largest : a . kilobyte - gigabyte - byte - megabyte - nibble - bit [3 ] b. gigabyte - petabyte - kilobyte - exabyte - terabyte - megabyte [ 3 ] 1.3 - Primary Storage 1.5 - Performance Theory Topics
- 2.2 - Phases of Software Development Models | F160 | Cambridge Advanced National in Computing AAQ
Learn about the different phases in software development models including planning, requirements, feasibility, design, construction / creation, testing, implementation (phased / parallel / big bang (crash)), documentation creation and maintenance. Based on Unit F160 (Fundamentals of Application Development) for the OCR Cambridge Advanced National in Computing (H029 / H129) (AAQ - Alternative Academic Qualification). Qualification: Cambridge Advanced National in Computing (AAQ) Unit: F160: Fundamentals of Application Development Certificate: Computing: Application Development (H029 / H129) 2.2 - Phases of Software Development Models Watch on YouTube : Phases of Software Development Models There are seven phases of software development models you need to know. As well as knowing the common phases and the key tasks within each phase , you must also understand how and why phases interact with each other and why they may iterate . Phases of Software Development Models Key Phases Planning (including requirements and feasibility ) Design Construction / Creation Testing Implementation (including phased , parallel and big bang ( crash ) methods) Maintenance Documentation creation Phased Parallel Big Bang Q uesto's Q uestions 2.2 - Phases of Software Development Models: 1. Describe the common tasks in each of the first four phases of software development . [8 ] 2. Explain the three implementation methods : phased , parallel and big bang (crash ). [6 ] 3. Describe the common tasks in the final two phases . [4 ] 4. Explain why it is important that phases interact with each other. [ 2 ] Maintenance is important - as of 2025 , some US air traffic control towers still use and maintain systems using Windows 95 and floppy disks because of their reliability . D id Y ou K now? 2.1 - Software Development Models Topic List 3.1 - Planning Projects
- Python | Section 9 Practice Tasks | CSNewbs
Test your understanding of string and number handling techniques in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python - Section 9 Practice Tasks Task One It is the national hockey championships and you need to write the program for the TV channel showing the live games. Let the user enter the name of the first country that is playing. Then let the user enter the name of the second country . Shorten country 1 to the first two letters . Shorten country 2 to the first two letters . Bonus: Display the teams in uppercase . Example solution: Welcome to the National Hockey Championships!!! Enter the first country: Montenegro Enter the second country: Kazakhstan Scoreboard: MO vs KA G Task Two In some places, the letter G is seen as an offensive letter. The government want you to create a program to count how many times the letter G appears in a sentence . Let the user input any sentence that they like. You need to count how many g’s there are. Then print the number of g’s there are. Example solution: Enter your sentence: good day! great golly gosh, got a good feeling! There were 7 instances of that awful letter! Task Three A pet shop has just ordered in a batch of new dog collars with name tags. However, there was a mistake with the order and the tags are too small to display names longer than 6 characters . You need to create a program that checks the user’s dog name can fit. Let the user enter their dog’s name . Calculate the length of their name. Use an if statement to see if it is greater than 6 characters . If it is then print – Sorry but our dog tags are too small to fit that. Otherwise print – Excellent, we will make this dog tag for you. Example solutions: Welcome to 'Dogs and Cats' Pet Shop! What is the name of your dog? Miles Excellent, we will make this dog tag for you! Welcome to 'Dogs and Cats' Pet Shop! What is the name of your dog? Sebastian Sorry, our dog tags are too small! Task Four It’s literacy week and the Head of English would like you to create a vowel checker program to ensure that year 7s are using plenty of vowels in their work. Let the user enter any sentence they like. For each letter in the sentence that they have just entered you need to use if statements to check if it is a vowel . You will need to use the OR operator between each statement to separate them. After the for loop you need to print the number of vowels they have used. Example solution: Enter your sentence: Put that thing back where it came from, or so help me! You used 14 vowels in your sentence. Task Five Remember the national hockey championships? Well, the company that hired you just fired you… Never mind though, a rival scoreboard company want to hire you right away. You need to let the user enter two countries like last time. But this time you don’t want to calculate the first two letters, you want to print the last three letters . Example solution: Welcome back to the National Hockey Championships!!! Enter the first country: Montenegro Enter the second country: Kazakhstan Scoreboard: GRO vs TAN Task Six Too many people are using inappropriate names on Instagram so they have decided to scrap the username and will give you a code instead. The code is the 2nd and 3rd letters of your first name , your favourite colour and then the middle two numbers of the year you were born . Let the user input their name, then their favourite colour and then the year they were born. Using their data, calculate their new Instagram name! Example solution: Welcome to Instagram What is your name? Matthew What is your favourite colour? red Which year were you born in? 1987 Your new profile name is: ATRED98 Task Seven Copy the text on the right and create a program that will split the text at each full stop. Count the number of names in the list. Print the longest name. Example solution: The list contains 20 names The longest name is alexandria annabelle.clara.damien.sarah.chloe.jacques.mohammed.steven.rishi.raymond.freya.timothy.claire.steve.alexandria.alice.matthew.harriet.michael.taylor ⬅ 9b - Number Handling 10a - Open & Write To Files ➡
- Python | 7a - Procedures | CSNewbs
Learn how to create and use procedures in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python 7a - Procedures Subroutines A subroutine is a section of code that can be re-used several times in the same program. It is separate from the main code and has to be ‘called’ upon. Subroutines are designed to be repeated, and they have three key benefits: Subroutines make programs easier to read . They reduce the duplication of code . Complex problems are broken down into smaller chunks . There are two types of subroutines: procedures and functions . A procedure just executes commands , such as printing something a certain number of times. A function produces information by receiving data from the main program and returning a value to the main program. For example, a function could take the radius of a sphere from the main program, calculate a sphere’s area and return the value of the area to the main program. A function generally requires parameters to work – these are the values to be transferred from the main program to the subroutine. Procedures A procedure i s a type of subroutine that runs independently of the main program . A subroutine must be defined at the top of the program before the main code by typing def and the name of the subroutine . In the example below I have created a procedure to calculate the multiplication of two numbers and a separate procedure for the division. The main program starts beneath the subroutines , against the left side of the editor. I have created a while true loop that asks the user if they want to multiply, divide or stop the program. If they choose to multiply, the multiply subroutine is called . This initiates that subroutine then returns to the main program when it is complete. If they choose to divide, the divide subroutine is called instead. Typing stop will break (end) the loop. Here you can see the two parts of the program put together. Subroutines must be written first , with the rest of the program underneath. Subroutines can be called in any order . Below I have run the program and divided then multiplied before breaking the loop: Practice Tasks 1 1. Create a procedure called hello that just prints “Hello there! ”. In the main program create a for loop that calls the procedure 10 times. You must use a procedure. 2. Create a program with two procedures. The addition procedure allows the user to add two numbers together. The subtraction procedure allows the user to take a number away from another. Use a while true loop in the main program and a break to stop the loop. Example solution for #1: Local & Global Variables Programming languages use local variables and global variables . A global variable can be used anywhere in the program . A local variable can only be used in the subroutine it is created in . I have adapted the multiply / divide program below to use global variables by stating the global command and the name of the variables in each subroutine. This allows me to ask the user to enter numbers in the main program. Practice Tasks 2 1. Adapt your addition / subtraction program from the first practice task section to use global variables. 2. Create a program that asks the user to enter their name in the main program. Call a subroutine that greets the user using the name variables. You must use a procedure and a global variable . Example solution for #2: ⬅ Section 6 Practice Tasks 7b - Functions ➡
- 4.2 - Signed Binary - Eduqas GCSE (2020 Spec) | CSNewbs
Learn about two methods of representing negative numbers in binary - sign and magnitude and two's complement. Based on the 2020 Eduqas (WJEC) GCSE specification. 4.2: Signed Binary Exam Board: Eduqas / WJEC Specification: 2020 + What are Sign and Magnitude and Two's Complement? Sign and Magnitude and Two's Complement are both methods of writing positive and negative binary values . Sign and Magnitude is simpler but will cause incorrect answers if used in binary calculations . Two's Complement is more complex but will generate correct answers when used in binary calculations . Sign & Magnitude The most significant bit (MSB ) is the largest bit of a binary number - the one furthest to the left . The MSB is the sign - it represents whether the binary value is positive or negative . If the sign is 0 then the binary number is positive . If the sign is 1 then the binary number is negative . The other bits represent the magnitude - the value of the binary number. For an 8-bit binary number , the range is -127 to 127 , because only 7 bits are used to define the magnitude. Sign & Magnitude: Problems Sign and magnitude is not commonly used by computers for two main reasons: Performing binary addition and subtraction (see section 4.3 ) will often cause a wrong result . In the example below, -7 + 3 should equal -4 but the result given is 2. + Sign and magnitude creates two different values for 0 - positive 0 and negative 0 which is incorrect. Two's Complement Two's complement is a method of representing positive and negative binary values. It is used often by computers because binary calculations will work correctly and there is only one value for zero. Two's Complement: Denary to Binary To represent a negative value using two's complement follow these steps: Write out the positive value in binary . Start on the right-hand side and move along, copy all 0s until you get to the first 1 . The first 1 is copied too. After the first 1 invert each value (change to its opposite ). So 0 becomes 1 and 1 becomes 0 . 1. 2. 3. Two's Complement: Binary to Denary To convert a binary number to denary using two's complement you must remember that the MSB is a negative value . Just add the numbers with 1 together to work out the denary value . Q uesto's Q uestions 4.2 - Signed Binary: Sign & Magnitude 1. Using sign and magnitude , convert the following values to denary : a. 00011101 b. 11100011 c. 10110110 d. 01001111 [1 each ] 2. Using sign and magnitude , convert the following values to binary : a. 83 b. -13 c. -102 d. -24 [1 each ] 3. Describe two problems when using sign and magnitude . [ 4 ] 4. Using sign and magnitude , the range of numbers that can be represented in 6 bits is from - 31 to + 31 . State the range of numbers that can be represented using sign and magnitude in the following bits: a. 8 bits b. 4 bits [1 each ] Two's Complement 1. Using two's complement , convert the following values to binary : a. -20 b. -49 c. -87 d. -113 [2 each ] 2. Using two's complement , convert the following values to denary : a. 10110010 b. 11101110 c. 01101011 d. 10011111 [2 each ] Watch the video to learn how sign and magnitude is used to represent negative numbers in binary . Watch the video to learn how two's complement is used to represent negative numbers in binary . Watch on YouTube Watch on YouTube 4.1 - Number Systems Theory Topics 4.3 - Binary Calculations
- Python | 5d - Colorama | CSNewbs
Learn how to change the colour of text in Python using the colorama library. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python 5d - COlorama What is Colorama? Colorama is a library that allows the colour of text to be changed. Information about the library can be found on the Python Package Index (PyPi) website . Copyright of the library is held by Jonathan Hartley & Arnon Yaari. Colorama can be imported when using some online editors like Replit . Colorama is not available as a default library on the standard Python offline editor (IDLE) . Using Colorama The three main commands using Colorama are: Fore to change the text colour. Back to change the highlight colour. Style to make the text appear dim or bright. from colorama import Fore print (Fore. GREEN + "Hello There" ) Hello There from colorama import Back print (Back.YELLOW + "Goodbye Now" ) Goodbye Now from colorama import Style print (Style.DIM + "Hi Again" ) Hi Again There are 8 possible colours to choose with the Fore and Back commands. You must write the colour name in CAPITAL LETTERS . BLACK CYAN GREEN MAGENTA RED WHITE YELLOW There is also the RESET option, e.g. Fore.RESET The 2 options to choose with the Style command are DIM and BRIGHT . You can also use Style.RESET_ALL Colorama Task 1 ( Traffic Lights) Create a simple traffic light program . The user is prompted for an input . Typing "GO " will output a suitable message in GREEN , typing "WAIT " will output a message in YELLOW and typing "STOP " will output a response in RED . Example solutions: What should the driver do? STOP You must stop your car. What should the driver do? GO It is safe to continue driving. ⬅ 5c - Date & Tim e 5e - M ore Libraries ➡
- Expansion Cards | Key Stage 3 | CSNewbs
Learn about two important expansion cards that can be connected to the motherboard - graphics cards and sound cards - and how they work. Expansion Cards PCI slots What are expansion cards? Expansion cards are additional components that you plug into the motherboard’s expansion slots to add or enhance features . The slots are called PCI (on older computers ) or PCIe (on newer models ). Common types are graphics cards (video ), sound cards (audio ), network cards (internet ) and capture cards (streaming ). Graphics Card A graphics card processes images , videos and 3D graphics so they look smooth and realistic . It is used for gaming , video editing , 3D modelling and Virtual Reality (VR ). It has its own processor - the Graphics Processing Unit (GPU ) - and dedicated memory (VRAM ), so it doesn’t overload the CPU or RAM . Modern graphics cards can also handle tasks like artificial intelligence (AI ) and bitcoin mining . Graphics cards usually have a cooling system, like a fan , so it doesn't overheat. The graphics processing unit ( GPU ) is a chip that renders images and video. The graphics card has ports such as HDMI or DisplayPort to connect monitors or TVs. The PCIe connector allows the graphics card to slot onto the motherboard. Sound Card The DAC ( Digital-to-Analogue Converter ) converts digital data (1s and 0s) from the computer into analogue sound waves for speakers/headphones. The ADC ( Analogue-to-Digital Converter ) converts analogue input (like voice from a microphone) into digital data the computer understands. Jacks are small round sockets where you plug in audio devices like headphones, microphones, or speakers. The PCIe connector allows the sound card to slot onto the motherboard. A sound card improves the quality of audio input/output compared to the motherboard’s built-in sound . They are not needed by most users , because of the motherboard's built-in sound , but they are used by music production , gaming or professional audio work . It can support surround sound systems , high-quality microphones , and musical instruments using jacks (audio ports ). Integrated cards Built directly into the motherboard . Cheaper , uses less power and is good enough for basic tasks (e.g. web browsing , watching videos and office work ). Shares the computer’s RAM and processor (CPU ) instead of having its own . An example is integrated graphics on a laptop for browsing and schoolwork . Dedicated cards These are separate expansion cards (e.g. graphics card or sound card ) to connect to the motherboard 's PCIe slots . They usually have their own processor and memory (e.g. GPU & VRAM for graphics ). Much more powerful , ideal for gaming , video editing , 3D design or professional audio . Uses more power and costs more . KS3 Home
- Python | 1a - Printing | CSNewbs
Learn how to create print statements in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python 1a - Printing Printing in Python To output a message onto the screen, use the print command. Then place your message within brackets and speech marks . For example: print ( "Welcome to Python!" ) When you run the program, the text will print to the Python console: Welcome to Python! Printing Task 1 (Full Name & To Your Left) On the first line, print your first name and surname. On the next line, write another print statement to print t he name of the person (or thing) to your left. Example solution: Elsie Parker pencil case Printing over Several Lines One way of writing across multiple lines is to write several print commands like this: print ( "Welcome to...." ) print ( "Computer Science " ) print ( "Newbies!!! " ) = Welcome to .... Computer Science Newbies!!! However, when we program, we always want to make our code the most efficient it can be by using as few lines as possible . Therefore you can write \n within a printed statement to move it to the next line. Make sure you use \ and not / otherwise it will print the slash and not make a new line! print ( "Welcome to....\n Computer Science\n Newbies!!! " ) = Welcome to .... Computer Science Newbies!!! Both pieces of code display the same thing, but the second one is more efficient because it only uses one line. Printing Task 2 (Name, Colour, Movie) Use \n to write your name, favourite colour and favourite movie in only one line of code. Example solution: Matthew yellow Interstellar ⬅ Setting Up Python 1b - Comments ➡
- 3.1 - Network Characteristics - Eduqas GCSE (2020 spec) | CSNewbs
Learn about the advantages and disadvantages of networks, the five types of network - LAN, WAN, PAN, MAN and VPN - and differences between wired and wireless networks. Based on the 2020 Eduqas (WJEC) GCSE specification. 3.1: Network Characteristics Exam Board: Eduqas / WJEC Specification: 2020 + What is a network? A network is more than one computer system connected together allowing for communication and sharing of resources . There are many benefits but also some drawbacks to using a network compared to having an unconnected ('standalone' ) computer: Advantages of Networks Easily share files , software and hardware between computers. Disadvantages of Networks There is an initial cost because network devices like routers are required . Larger companies will need to buy and maintain a server . Log in from any connected computer and access your data and files. A network manager / administrator might need to be employed to maintain the network . An administrator can monitor network activity and control security settings. Data from computers on the network can be automatically backed up on central storage. Security breaches are more likely and malware , such as worms, can spread quickly across the network. If the web server fails , all connected computers won't be able to access files or log on . Network Types Networks can be split into different types , usually categorised by their geographical distance apart and the area that they serve. Local Area Network A local area network (LAN ) has computer systems situated geographically close together , usually within the same building or small site , like a school or office . Wide Area Network A wide area network (WAN ) has computer systems situated geographically distant to each other, possibly across a country or even across the world . The internet is an example of a WAN that spans the globe. Personal Area Network A PAN is a personal network for an individual , such as a photographer connecting a smartphone, desktop computer and printer together. Metropolitan Area Network A MAN is larger than a LAN but smaller than a WAN and typically covers a relatively large area like a university campus, town or city . Virtual Private Network A VPN allows for a secure and encrypted connection to a public network like the internet. It is often used to protect an individual's privacy by concealing their real location. Wired & Wireless Networks Wired Connections Wireless Connections Wireless connections, such as WiFi or Bluetooth , use no cables but require a wireless network interface card (WNIC ). Wireless connections generally have a slower speed and can be affected by the computer's distance from the wireless router as well as obstacles like walls or bad weather. Wired connections use physical cables , such as copper or fibre optic wires , and require a network interface card (NIC ) to connect to a network. These wired connections use a wired connection protocol - most commonly Ethernet . Restricted Movement Faster More Secure NIC Required Freedom of Movement Slower Less Secure WNIC Required Q uesto's Q uestions 3.1 - Network Characteristics: 1. A retirement home for the elderly is considering installing a LAN , give 3 benefits and 3 drawbacks they might find of using a network . [6 ] 2a. Describe the difference between a LAN and WAN . [2 ] 2b. Give an example of how a LAN and a WAN could each be used . [ 2 ] 3 . Explain the differences between a PAN , MAN and VPN . [ 3 ] 4. For each of the scenarios below, state which network type would be most suitable : a. The IT rooms of a secondary school . [ 1 ] b. A study in a house with a desktop and printer. [ 1 ] c. Using online banking when abroad on a holiday to stay secure . [ 1 ] d. A large technology company with offices across Europe . [ 1 ] e. Council offices with several locations across Manchester . [ 1 ] 5. Briefly compare wired and wireless networks . [ 8 ] 2.2 - Boolean Algebra 3.2 - Data Packets & Switching Theory Topics
- Python | 8a - Using Lists | CSNewbs
Learn how to create and use lists in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python 8a - Using Lists Lists A list is a temporary data structure . Any changes made to the list while the program is running will not be saved the next time it is run . Data can be added to and removed from lists so they can change in size (unlike an array which is fixed and not used in Python). It is important to note that each data element in a list has an index so that it can be specifically referenced (to delete it for example) and that indexes start at 0 . A list of the rainbow colours in order would start at 0 like this: Creating & Printing Lists Lists use square brackets in Python. Separate list items with commas . Strings must use speech marks and integers do not use speech marks. people = [ "Alan" , "Jesse" , "Max" , "Jack" ] years = [ 2010, 2019, 2001, 2016 ] There are many different ways to print items from a list depending on how you want it to look . Print all items on one line Type the list name into a print command to output the complete list . Typing an asterisk * before the list name removes punctuation . cities = [ "Shanghai" , "Sao Paolo" , "Bishkek" , "Asmara" ] print (cities) cities = [ "Shanghai" , "Sao Paolo" , "Bishkek" , "Asmara" ] print (*cities) ['Shanghai', 'Sao Paolo', 'Bishkek', 'Asmara'] Shanghai Sao Paolo Bishkek Asmara Print each item on a separate line To print a list line-by-line use a for loop to cycle through each item. 'city ' is just a variable name and can be replaced with the traditional 'i ' or anything relevant to the context, such as 'colour ' in a list of colours or 'name ' in a list of people. cities = [ "Shanghai" , "Sao Paolo" , "Bishkek" , "Asmara" ] for city in cities: print (city) Shanghai Sao Paolo Bishkek Asmara Print separated items on one line To print separated data elements on the same line then you can use the end command which defines what should go after each item . The example below uses slashes but end = " , " would add comma and space between each element. cities = [ "Shanghai" , "Sao Paolo" , "Bishkek" , "Asmara" ] for city in cities: print (city, end = " / " ) Shanghai / Sao Paolo / Bishkek / Asmara / Print specific list items To print an element with a certain index , put the index in square brackets . But remember that the index starts at 0 not 1. cities = [ "Shanghai" , "Sao Paolo" , "Bishkek" , "Asmara" ] print ( "The first city is" , cities[0]) print (cities[2], "is the third city" ) The first city is Shanghai Bishkek is the third city Create a list of five different of foods . Print all list items on one line . Then print each item on a different line . Finally print just the first and fifth items . Example solution: lettuce yoghurt tomato artichoke tuna lettuce yoghurt tomato artichoke tuna The first item is lettuce The fifth item is tuna Lists Task 1 (Five Foods ) Lists Task 2 (Four Numbers ) Create a list of four integer values . Print all list items on one line separated by colons . Example solutions: 345:123:932:758: 812:153:783:603: Add (Append / Insert) to a List Append items to the end of a list To add a new item to the end of a list use the .append() command. Write .append() after the name of your list, with the new data in brackets . pets = [ "dog" , "cat" , "hamster" ] pets.append( "rabbit" ) print (*pets) fillings = [ "ham" , "cheese" , "onion" ] extra = input ( "Enter another filling: " ) fillings.append(extra) print ( "Your sandwich:" , *fillings) dog cat hamster rabbit Enter another filling: lettuce Your sandwich: ham cheese onion lettuce Insert items to a specific index Use the insert command to place an item in a specific position within the list. Remember that Python counts from 0 so the medals example below puts "silver" as index 2 , which is actually the 3rd item . medals = [ "platinum" , "gold" , "bronze" ] medals.insert(2, "silver" ) print (*medals) names = [ "Stacy" , "Charli" , "Jasper" , "Tom" ] name = input ( "Enter a name: " ) position = int ( input ( "Enter an index: " )) names.insert(position,name) print (*names) platinum gold silver bronze Enter a name: Lena Enter an index: 0 Lena Stacy Charli Jasper Tom Enter a name: Pat Enter an index: 3 Stacy Charli Jasper Pat Tom Use a loop to add items to a list A for loop can be used to add a certain number of items to a list. A while loop can be used to keep adding values until a certain value (e.g. ' stop ' or ' end ') is input. animals = [ ] for i in range (4): animal = input ( "Enter an animal: " ) animals.append(animal) print ( "\nAnimals:" , *animals) animals = [ ] while True : animal = input ( "Enter an animal: " ) if animal == "stop" : break else : animals.append(animal) print ( "\nAnimals:" , *animals) Enter an animal: lion Enter an animal: horse Enter an animal: hyena Enter an animal: squirrel Animals: lion horse hyena squirrel Enter an animal: rhino Enter an animal: gazelle Enter an animal: deer Enter an animal: stop Animals: rhino gazelle deer Example solution: Lists Task 3 (Favourite Musicicans ) Create a list of three musicians or bands you like . Print the list . Then append two new bands using two inputs . Print the list again. Use the sandwich filling example for help. Musicians I like: Lana Del Rey Devon Cole Elly Duhé Enter another musician: Charli XCX Enter another musician: Kenya Grace Musicians I like: Lana Del Rey Devon Cole Elly Duhé Charli XCX Kenya Grace Lists Task 4 (Missing 7 ) Create a list of numbers in order from 1 to 10 but miss out 7 . Use the insert command to add 7 in the correct place . Print the list before and after you insert 7. Example solution: 1 2 3 4 5 6 8 9 10 1 2 3 4 5 6 7 8 9 10 Lists Task 5 ('Land' Countries ) Use a while True loop to input countries that end in 'land' until the word 'finish ' is input . Print the list at the end. Note: You do not need to check if the countries entered are correct. There are also more than four. Example solution: Enter a country ending in 'land': Iceland Enter a country ending in 'land': Poland Enter a country ending in 'land': Switzerland Enter a country ending in 'land': Thailand Enter a country ending in 'land': finish Country list: Iceland Poland Switzerland Thailand Delete (Remove/Pop) from a List Delete items with a specific value To delete data with a certain value use the .remove() command, with the value in brackets . trees = [ "fir" , "elm" , "oak" , "yew" ] trees.remove( "elm" ) print (*trees) fir oak yew trees = [ "fir" , "elm" , "oak" , "yew" ] tree = input ( "Select a tree to remove: " ) trees.remove(tree) print (*trees) Select a tree to remove: oak fir elm yew Delete items with a specific index To delete data in a specific position in your list use the .pop() command, with the position in the brackets . Remember that indexes start at 0 so .pop(0) removes the first item . Negative values start from the end of the list , so -1 is the final item and -2 is the second last item and so on. kitchen = [ "plate" , "cup" , "spoon" , "jug" ] kitchen.pop(0) print (*kitchen) kitchen = [ "plate" , "cup" , "spoon" , "jug" ] kitchen.pop(-2) print (*kitchen) kitchen = [ "plate" , "cup" , "spoon" , "jug" ] index = int ( input ( "Select an index: " )) kitchen.pop(index) print (*kitchen) cup spoon jug plate cup jug Select an index: 1 plate spoon jug Delete all items in a list To delete data in a list use the .clear() command. insects = [ "ant" , "bee" , "wasp" ] insects.clear() insects.append( "hornet" ) print (*insects) hornet Lists Task 6 (Day Off ) Example solution: Create a list with the five week days . Ask the user to input a weekday and remove that day from the list. Print the list. Which day do you want off? Tuesday Your new days of work: Monday Wednesday Thursday Friday Lists Task 7 (May and October ) Create a list with the twelve months in order . Delete May and then October using the pop command by referring to their indexes in the list. Print the list. Note: Be aware the index of each month after May will change when May is popped from the list. Example solution: January February March April June July August September November December Finding the Length of a List To find the length of a list use the len function. You can create a separate variable for the length (shown in the first example below) or use the len command directly (second example). states = [ "Maine" , "Utah" , "Ohio" , "Iowa" ] length = len (states) print ( "There are" , length , "states in the list." ) states = [ "Maine" , "Utah" , "Ohio" , "Iowa" ] print ( "There are" , len (states), "states in the list." ) There are 4 states in the list. Lists Task 8 (Q Words ) Use a while True loop to input words beginning with q until the word ' stop ' is entered. Then use len to find the length of the list and print this value. Note: You do not need to check if the entered words actually start with q. Example solution: Input a Q word: question Input a Q word: quick Input a Q word: quiet Input a Q word: quandry Input a Q word: stop You wrote 4 Q words! Cycle Through List Items A for loop can be used to cycle through each item in a list. The following examples present some ways that this may be used. This program uses a for loop to add a word (David) before each list item. davids = [ "Beckham" , "Attenborough" , "Schwimmer" , "Tennant" , "Lynch" ] for i in range (5): print ( "David" , davids[i]) David Beckham David Attenborough David Schwimmer David Tennant David Lynch An if statement can be used within a for loop to check the value of each item . The example below checks how many items are 'medium'. sizes = [ "small" , "medium" , "small" , "large" , "medium" , "small" ] count = 0 for i in range (6): if sizes[i] == "medium" : count = count + 1 print ( "There were" ,count, "medium choices." ) There were 2 medium choices. The program below uses a while loop to allow entries until 'stop ' is input then a for loop to check the value of each item . Because the final length of the list is not known when the program starts, the len command is used in the range of the for loop . sports = [] fcount = 0 rcount = 0 while True : option = input ( "Choose football or rugby: " ) sports.append(option) if option == "stop" : break for i in range ( len (sports)): if sports[i] == "football" : fcount = fcount + 1 elif sports[i] == "rugby" : rcount = rcount + 1 print ( "\nResults:" ,fcount, "people chose football and" ,rcount, "chose rugby." ) Choose football or rugby: rugby Choose football or rugby: rugby Choose football or rugby: football Choose football or rugby: rugby Choose football or rugby: football Choose football or rugby: stop Results: 2 people chose football and 3 chose rugby. Lists Task 9 (Over 25 ) Create a list with the following eight numbers: 13, 90, 23, 43, 55, 21, 78, 33 Use a for loop to cycle through the list and check if each item is over 25 . Use a count variable to increase by 1 if the number is over 25. At the end print how many numbers are over 25 - there are five . Example solution: 5 numbers are over 25. Lists Task 10 (Favourite Lesson ) Use a while True loop to keep inputting school subjects until ' done ' is entered. Keep a count of how many times ' Maths ' is entered. Print the total number of people who entered maths. Example solution: Enter a subject: English Enter a subject: Maths Enter a subject: Art Enter a subject: Maths Enter a subject: History Enter a subject: done There were 2 people who chose maths. Sorting Lists The .sort() command will sort elements in a list into alphabetical order (if a string ) or numerical order (if a number ). names = [ "Robb" , "Jon" , "Sansa" , "Arya" , "Bran" , "Rickon" ] print ( "Original:" , *names) names.sort() print ( "Sorted:" , *names) Original: Robb Jon Sansa Arya Bran Rickon Sorted: Arya Bran Jon Rickon Robb Sansa numbers = [56,98,23,12,45] numbers.sort() print (*numbers) 12 23 45 56 98 The .sort() command can be used to sort values in descending order by including reverse = True in the brackets. names = [ "Robb" , "Jon" , "Sansa" , "Arya" , "Bran" , "Rickon" ] print ( "Original:" , *names) names.sort(reverse = True ) print ( "Sorted:" , *names) Original: Robb Jon Sansa Arya Bran Rickon Sorted: Sansa Robb Rickon Jon Bran Arya numbers = [56,98,23,12,45] numbers.sort(reverse = True ) print (*numbers) 98 56 45 23 12 Lists Task 11 (Sorted Fruit ) Example solution: Use a for loop to append six fruits to an empty list. Sort the list into alphabetical order and print it. Enter a fruit: strawberry Enter a fruit: kiwi Enter a fruit: lemon Enter a fruit: pear Enter a fruit: orange Enter a fruit: mango Sorted fruit: kiwi lemon mango orange pear strawberry Searching Through Lists A simple if statement can be used to see if a certain value appears within a list. names = [ "Alex" , "Bill" , "Charlie" , "Darla" ] name = input ( "Enter a name: " ) if name in names: print ( "Yes," , name , "is in the list." ) else : print ( "Sorry," , name , "is not in the list." ) Enter a name: Bill Yes, Bill is in the list. Enter a name: Sadie Sorry, Sadie is not in the list. Lists Task 12 (Packed Suitcase ) Example solutions: Create a list with five items to take on holiday. Ask the user to input an item and use an if statement to check if it is or isn't in the list. What should I pack? sun cream I've already packed sun cream What should I pack? toothpaste Whoops! I forgot to pack toothpaste Calculating the Sum of a List To calculate the sum of a list of numbers there are two methods. Using Python's built-in sum function : numbers = [1,4,2,3,4,5] print ( sum (numbers)) Both methods will result in the same output : 19 Using a for loop to cycle through each number in the list and add it to a total . numbers = [1,4,2,3,4,5] total = 0 for number in numbers: total = total + number print (total) Lists Task 13 (Sum and Average ) Example solution: Use a for loop to ask the user to input 5 numbers and append each to a list. Use the sum command to output the total and use it calculate the average . Enter a number: 6 Enter a number : 7 Enter a number : 6 Enter a number : 9 Enter a number : 4 The total is 32 The average is 6.4 Extending a List .extend() can be used in a similar way to .append() that adds iterable items to the end of a list . This commands works well with the choice command (imported from the random library ) to create a list of characters that can be randomly selected. The code below adds a lowercase alphabet to an empty list and then, depending on the choice of the user, adds an uppercase alphabet too. The choice command is used in a loop to randomly select 5 characters. Using .extend() to make a random 5-character code from random import choice list = [] list. extend ( "abcdefghijklmnopqrstuvwxyz" ) upper = input ( "Include uppercase letters? " ) if upper == "yes" : list. extend ( "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ) code = "" for number in range (5): letter = choice (list) code = code + letter print ( "Your five character code is" , code) Possible outputs: Include uppercase letters? yes Your five character code is yPfRe Include uppercase letters? yes Your five character code is GJuQw = Include uppercase letters? no Your five character code is gberv Extend treats each character as an indidual item whereas append adds the whole string as a single entity . Most of time append would be used, but extend is suitable for a password program as additional individual characters can be added to a list depending on the parameters (e.g. lowercase letters, uppercase letters, numbers and special characters). list = [] list. extend ( "ABCD" ) list. extend ("EFGH" ) print (list) list = [] list. append ( "ABCD" ) list. append ("EFGH" ) print (list) ['A','B','C','D','E','F','G','H'] ['ABCD' , 'EFGH'] = = Practice Task 14 Use the code above (for a 5-character code ) to help you make a password generator . Ask the user if they want uppercase letters , numbers and special characters and use the extend command to add them to a list of characters if they type yes (you should extend lowercase characters into an empty list regardless, like in the code above). Use a for loop and the choice command (imported from the random library) to randomly generate a 10-character password . Example solutions: Include uppercase letters? yes Include numbers? yes Include special characters? yes Your new password is RjWSbT&gW5 Include uppercase letters? no Include numbers? yes Include special characters? no Your new password is hdf8se9y2w ⬅ Section 7 Practice Tasks 8b - 2D Lists ➡
- Memory | Key Stage 3 | CSNewbs
Learn about the three main types of memory in a computer system - RAM (Random Access Memory), ROM (Read Only Memory) and Cache Memory. Memory What is memory? Memory is where a computer stores information , instructions and data so it can use them quickly when needed . There are three main types of memory : RAM Random Access Memory ROM Read Only Memory Cache Memory What is Random Access Memory? RAM is volatile (this means that when power is lost, the data is deleted ). Every program that is being run by the computer (such as Google Chrome, Spotify or Microsoft Word) is stored in RAM . RAM is made up of a large number of storage locations , and each is identified with a unique address . What is Read Only Memory? ROM is non-volatile (this means that data is saved, even when the power is off ). The start-up instructions (for when a computer is switched on ) are stored in ROM . ROM is read-only, which means that it cannot be edited or changed . What is Cache Memory? Cache memory is fast to access because it is built into the CPU (or very close to it) . Cache memory stores data that needs to be accessed very frequently . Cache memory is very expensive , so there is only a small amount in most computers. How can a computer run faster? There are many reasons why a computer may be running slowly . Here are some methods related to memory that can help speed up a system : Close unnecessary programs to free up RAM so it doesn't run out of memory space . Add more RAM so the computer can run more programs at once without slowing down . Increase the cache size so the CPU can access important data more quickly . KS3 Home Note: Only larger systems like desktop computers can have their components easily upgraded and replaced.
- 1.6 - Additional Hardware - Eduqas GCSE (2020 spec) | CSNewbs
Learn about the motherboard, graphics processing unit (GPU), sound card, embedded systems and input / output systems. Based on the 2020 Eduqas (WJEC) GCSE specification. 1.6: Additional Hardware Exam Board: Eduqas / WJEC Specification: 2020 + 1.6a - Internal Hardware Motherboard The motherboard is the main circuit board of a computer , unique for each device. It holds and connects the different components together , allowing data to be transferred between them. Components such as the CPU and ROM are directly attached to the motherboard. The motherboard has expansion slots for additional cards (i.e. sound cards) and ports (i.e. USB). Graphics Processing Unit (GPU) Sound Card A GPU is a microprocessor that performs complex calculations to generate graphical images to be displayed on a monitor . There are two types of GPU, integrated GPUs within the motherboard circuitry or dedicated GPUs on an additional card (known as a 'graphics card'). An integrated GPU is cheaper and generates less power because it uses the RAM of the computer . Integrated GPUs are used in tablets and laptops as they generate less heat and are optimal for general computing uses (e.g. web browsing or watching movies). A dedicated GPU is more expensive and generates more heat, often requiring a fan because it contains its own memory . Dedicated cards are used by animation professionals and professional gamers who require the best graphics. Sound cards convert analogue sound waves into digital data (binary) when inputting audio through a microphone. 0010 1011 0101 0101 0110 0111 0101 0001 0101 0010 1011 0101 0101 0110 0111 0101 0001 0101 Sound cards also convert digital data (binary) into analogue sound waves to output audio through speakers or headphones. 1.6b - 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 . Example: A traffic light has a control chip that determines when to change to a green or red light. 1.6c - Input & Output Devices Input devices are used by humans to interact with a computer system , through methods such as text , voice or touch . Output devices show the result of computer processing , such as sound , printed text or a visual display on a monitor. Storage devices , such as a USB stick or an external hard drive, are neither input nor output devices - see 1.4 . Input Devices These are just some of the more common input devices . A mouse and a keyboard have been described in further detail. Are there any devices below you haven't heard of before? Mouse Benefits: Easy to navigate a graphical user interface. A wireless mouse takes up less space . Faster to select options (e.g. in a video game). Drawbacks: Difficult to use for people with restricted hand movement . Difficult to use on some surfaces . Other input devices: Scanner Controller Microphone Webcam Chip Reader OCR Scanner OMR Scanner Barcode Scanner Graphics Tablet Sensors (e.g. light or temperature) Touch Screen Remote Control Biometric Scanner (e.g. fingerprint or iris) Concept Keyboard Sip / Puff Switch Keyboard Benefits: Quick to input text . Easy to use with a familiar layout on most keyboards. Keys can be customised and shortcuts can be used . Drawbacks: Takes up a large amount of space on a desk. Difficult for people to use with restricted hand movement or poor eyesight . Output Devices Monitor These are just some of the more common output devices . A monitor and a printer have been described in further detail. Are there any devices below you haven't heard of before? Other output devices: Plotter Speakers Projector Alarm Light Headphones Touch Screen Braille Terminal What is it? A monitor is required to see the result of human input and computer processing . Monitors can be bought in different sizes and resolutions for a range of purposes such as video editing or playing games . Monitors settings can be changed to alter the brightness or contrast . Printer What is it? A printer uses ink or toner to print a document (such as text or images) onto paper . Inkjet printers use ink cartridges , are generally slower and print in a lower quality . Laser printers use toner cartridges and are generally quicker and print to a higher quality . Q uesto's Q uestions 1.6 - Additional Hardware: 1.6a - Internal Hardware 1. What is the purpose of the motherboard ? [2 ] 2a. What is the purpose of the GPU ? [ 2 ] 2b. Describe two differences between integrated and dedicated expansion cards . [ 4 ] 3. Explain how a sound card works. [ 4 ] 1.6b - Embedded Systems 1. What is an embedded system ? [3 ] 2a. Give two examples of an embedded system. [ 2 ] 2b. Research and describe another example of an embedded system. [ 2 ] 1.6c - Input & Out[ut Devices 1. Choose four input devices and describe at least two benefits and two drawbacks of using each one. [ 8 ] 2. Describe three output devices . [ 3 ] 3. Justify which input and output devices would be most suitable in the following scenarios: a. A teacher needs to take the class register . [ 4 ] b. A family want to communicate with their cousins in Australia. [ 4 ] c. The school movie club wants to play Star Wars in the assembly hall. [ 4 ] d. An e-sports player is taking part in an online multiplayer tournament . [ 4 ] e. A laboratory needs security so that only registered scientists can enter. [ 4 ] 1.5 - Performance 2.1 - Logical Operators Theory Topics











