top of page

Search CSNewbs

304 results found with an empty search

  • 2.1 - Systems Software | OCR A-Level | CSNewbs

    Learn about operating systems, memory management (segmentation and paging), scheduling, interrupts, the BIOS, device drivers and virtual machines Based on the OCR H446 Computer Science A-Level specification. Exam Board: OCR A-Level 2.1 - Systems Software Specification: Computer Science H446 Watch on YouTube : Operating systems functions Paging & segmentation Interrupts Scheduling algorithms Types of operating system BIOS Device drivers Virtual machines This topic looks at how the operating system manages the resources of a computer system . It also includes programs related to the operating system , such as the BIOS , device drivers and virtual machines . Operating Systems The operating system performs essential functions to keep a computer running efficiently . It provides a user interface , such as a command line or graphical user interface ( GUI ), and ensures system security by managing access rights and protecting files . The OS manages hardware , coordinating devices like the CPU , printers and hard drives and provides built-in utilities for tasks such as file management and disk defragmentation . It acts as a platform for software , allowing applications to be installed and run . The OS also schedules jobs , handles interrupts from devices, and manages memory , ensuring each process has the resources it needs without conflicts. Paging & Segmentation Paging is a memory management method that splits memory into equal-sized blocks called pages . This makes memory use more efficient as programs don’t need to be stored in one continuous block but unused space may be wasted inside a page . Segmentation divides memory into segments of different sizes based on program structure . This makes it easier to organise parts of a program , but because segments are different sizes , it can leave small unused gaps in memory that can’t be easily filled by other data. Interrupts An interrupt is a signal that tells the CPU to pause its current task and respond to something more urgent . Interrupts can come from hardware , such as a keyboard press , or from software , such as an error . When an interrupt occurs , the CPU saves its current state by placing current register values into a stack . The CPU runs an interrupt service routine ( ISR ) to handle the interrupt event . After the ISR finishes , the CPU restores its state by popping values from the stack and continues the original program . Scheduling Scheduling algorithms are used by the CPU to decide the order in which processes are executed . They aim to manage CPU time efficiently and ensure all programs get a fair share of resources . Common scheduling algorithms include: First-Come First-Served : Processes are executed in the order they arrive to the CPU . Round Robin : Each process gets a fixed time slice in turn , cycling through all processes. Shortest Job First / Shortest Time Remaining : These methods identify the process with the shortest estimated runtime to be executed first . Multi-Level Feedback Queue : Uses multiple queues with different priority levels . Processes can be moved between queues to avoid starvation . Types of OS Different types of operating systems exist depending on the computer system and purpose : Multitasking OS : Allows a single computer to run multiple programs at the same time by quickly switching between them. Multi-user OS : Lets multiple users access the computer and its resources simultaneously , often via a network . Distributed OS : Manages a group of networked computers as a single system , sharing resources and tasks . Embedded OS : Designed for devices with specific functions , like microwaves or smart TVs , often with limited resources . Real-time OS : Provides immediate processing and responses for time-critical tasks , used in systems like medical devices or industrial robots . The BIOS The BIOS (Basic Input/Output System ) is firmware stored in ROM that helps the computer start up and manage initial communication between hardware and the operating system . During the start-up sequence , the BIOS first checks that essential hardware (e.g. the CPU and RAM ) is present and working correctly by running a Power-On Self Test (POST ). Signals are transmitted to all connected components . The BIOS then runs the bootstrap program to locate and load the operating system from a connected storage device into RAM . Once the OS is loaded , control is handed over to it, allowing the computer to become fully operational . Device Drivers A device driver is software that allows the operating system to communicate with hardware devices such as printers , graphics cards or keyboards . Hardware and the OS speak different ' languages ', so the driver translates OS instructions into commands the device can understand and vice versa. They are needed because, without drivers , the OS wouldn’t know how to control the hardware or use its features properly. Drivers also allow devices to work with different versions of an operating system and enable updates that improve performance or fix bugs . Virtual Machines A virtual machine is a software-based computer that runs an operating system and applications like a real computer , using part of the host computer’s hardware . It is isolated from the main system , so it can operate safely without affecting the host . Virtual machines are commonly used for testing software , running multiple operating systems and safely handling untrusted files . They provide flexibility , efficient hardware use and a secure environment for experimentation . Q uesto's K ey T erms Operating Systems: user interface, file management, user management Memory Management: paging, segmentation, virtual memory Interrupts: interrupt, interrupt service routine, stack Scheduling Algorithms: first come first serve, round robin, shortest job first, shortest time remaining, multilevel feedback queue Types of Operating System: multitasking, multi-user, distributed, embedded, real-time BIOS: ROM - power-on self-test (POST) Device Drivers: device driver Virtual Machines: virtual machine, thin clients, servers D id Y ou K now? New versions of the Android operating system used to be named alphabetically after sweet treats , from Cupcake , Donut and Eclair to Nougat , Oreo and Pie - the final named update in 2019 . 1.3 - Input, Output & Storage A-Level Topics 2.2 - Applications Generation

  • 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

  • 1.3.2 - Software Categories | F160 | Cambridge Advanced National in Computing | AAQ

    Learn about the purpose, characteristics, advantages, disadvantages, examples and client requirements of application software categories including open, closed, shareware, freeware and embedded software. Resources 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) 1.3.2 - Application Software Categories Watch on YouTube : Open Software Closed Software Shareware Freeware Embedded Software There are five application software categories you need to know : Open Closed Shareware Freeware Embedded For each software category you need to know : Its purpose and common characteristics . The types of devices the software may be used on. The advantages and disadvantages of using the software. How client requirements affect the selection of that software. Application Categories Open Software Closed Software Open (usually known as open-source ) software is developed to be freely accessible and allow users to view , modify and distribute the source code . Its purpose is to promote collaboration and customisation when developing software . Closed (or closed-source or proprietary ) software is developed and distributed by a company or individual who owns the source code . The purpose is to maintain control , generate profit and ensure a consistent user experience . Shareware Shareware is closed software that is distributed for free on a trial basis , often with limited features or time restrictions . The purpose is to let users try before they buy , encouraging them to later purchase the full version . Freeware Freeware is closed software that is completely free to use , usually without restrictions like time limits or limited features , but still owned by a developer or company . The purpose is to provide software for free while retaining control over its code and distribution . Embedded Software Embedded software is designed to run on specific hardware and perform dedicated tasks . It is usually built into devices that are not traditional computers (like washing machines or microwaves ), allowing those devices to function efficiently and potentially automatically . Q uesto's Q uestions 1.3.2 - Application Software Categories: 1. Summarise the five categories of application software in two sentences each . [5 ] 2. An independent video game company has made a short game with just three levels. Justify which application software category they should use and why . [4 ] 3. Describe the advantages and disadvantages of using embedded software . [ 4 ] WinRAR is a shareware compression tool with a 40-day free trial , but it never actually locks users out. Since 1995 , WinRAR has been downloaded an estimated 500 million times . D id Y ou K now? 1.3.1 - Application Types Topic List 1.3.3 - Application Software Types

  • HTML Guide 9 - Colours & Fonts | CSNewbs

    Learn how to use the style tags in an HTML document to edit the background colour and font text and colour. 9. Style (Colours & Fonts) HTML Guide Watch on YouTube: Before you add any colours or font styles, you need to add tags. The style tags must be written within your head of your HTML document! Add them below your title tags: Add the

  • 4.2 - Client Requirement Specfications | F160 | Cambridge Advanced National in Computing AAQ

    Learn about the importance of client requirement specifications and the need for specific elements such as functional requirements, process constraints and data formats. 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) 4.2 - Client Requirement Specifications Watch on YouTube : Client Requirement Specifications A client requirement specification is a detailed document that outlines what the client needs from a new system . Elements include the new system’s purpose , functional and non-functional requirements , constraints and success criteria . As well as understanding the importance of creating client requirement specifications , you need to know the purpose of each element and how they can be gathered using the methods from section 4.1 . Client Requirement Specifications Elements of Requirement Specifications Specifications ensure developers and stakeholders fully understand what the client wants the system to do , avoiding misunderstandings and costly changes later. There are several elements of client requirement specifications you need to know : Purpose of the new system Current system deficiencies Requirements ( functional and n on-functional ) Data formats Process constraints Version and source control Client-defined constraints Three considerations for data storage location are local/onsite , cloud and physical storage devices . Budget Time Integration Software Hardware Data storage location Q uesto's Q uestions 4.2 - Client Requirement Specifications: 1. Give three reasons why it is important to create a client requirement specification . [8 ] 2. Describe the purpose of each client-defined constraint . [6 ] 3. Describe the difference between functional and non-functional requirements . [ 2 ] Some cloud storage data centres are built in cold climates , such as Sweden and Norway , to reduce cooling costs for servers that run 24/7 . D id Y ou K now? 4.1 - Gathering Client Requirements Topic List 4.3 - Decomposition Methods

  • Python | 2b - Inputting Numbers | CSNewbs

    Learn how to input numbers in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python 2B - Inputting Numbers Inputting Whole Numbers in Python To enter whole numbers then you must use the int command. int stands for integer (a whole number ) and is typed before input – don’t forget the double brackets at the end . age = int ( input ( "How old are you? " )) print ( "Have you really lived for " , age , "years?" ) = How old are you? 99 Have you really lived for 99 years? Inputting Numbers Task 1 ( Zoo) Type an input line (with int ) to ask the user how many times they’ve been to the zoo . Print a reply that uses the zoo variable (their answer). Example solution: How many times have you been to the zoo? 3 You've been to the zoo 3 times? I love animals! Inputting Decimal Numbers in Python Using float instead of int allows a decimal number to be entered instead. Again, don’t forget the double brackets at the end . miles = float ( input ( "How far have you walked today? " )) print ( "You really walked for " , miles , "miles? Wow!" ) = How far have you walked today? 5.6 You really walked for 5.6 miles? Wow! Inputting Numbers Task 2 ( Height ) Type an input line (with float ) to ask the user their height in metres. Print a reply that uses the height variable (their answer). Example solution: What is your height in metres? 1.82 You are 1.82 metres tall? Wow! ⬅ 2a - Inputting Text Sect ion 2 Practice Tasks ➡

  • 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

  • 1.1 - Holders of Information | Unit 2 | OCR Cambridge Technicals | CSNewbs

    Learn about the different types of organisations that hold information. Also, consider the differences between urban and rural connections and remote locations. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification for Unit 2. 1.1 - Holders of Information Exam Board: OCR Specification: 2016 - Unit 2 Categories of Information Holders Organisations that store and process information can be put into seven different categories : Business A business will hold information on all of its employees , including their date of birth, address and financial information , allowing them to be paid at the end of each month. Businesses will also hold commercial information about their organisation such as profits and losses, product descriptions and historical data . Many companies may record information about their competitors and general marketing data. Government The government will hold a huge amount of information about all citizens in the country including financial earnings, tax paid, births and deaths . The electoral roll holds information about addresses . A national census is taken every 10 years in the UK (the next census is in 2021) that records extensive data about everyone living in the country. The government also stores information about other countries and shares some of this publicly, such as the Foreign Office posting travel advice . Individual Education Educational organisations , such as schools, colleges and universities will hold information about current and past students as well as staff. Student information such as addresses, attendance records and examination history will be recorded, as well as contact information for parents and guardians. Teacher information will be stored too, as well as students that previously attended the institution, even for a number of years after they have left. An individual will hold information about themselves , either in their head or on paper or electronically. This includes their name, date of birth, address, usernames and passwords . Individuals will store information of others , such as phone numbers, social media details and email addresses . Other information will be about organisations , such as the address of their favourite restaurant, opening hours of the local cinema or the telephone number from a catchy advert. Healthcare Healthcare services , like the NHS in the United Kingdom, will hold entire medical histories for each civilian in the country. This includes basic personal information such as current address and date of birth but much more detailed data too like previous illnesses and operations, blood type, allergies and prescriptions . The data stored by healthcare organisations is usually confidential and should not be shared by anyone other than the citizen in question. Charity & Community Charities may hold financial information of donors who give money to them, as well as information about the different projects that the donations are funding. Charities such as the British Heart Foundation might have physical addresses on the high street so information may be kept about the shops too. Community organisations like sport centres or religious institutions may hold information on members and matches, meetings or events . Comparison of Locations The location of systems and data affects access speed and network quality . The digital divide is the gap between people who do and do not have easy access to computers and networks . Developed vs. Developing Countries Developed countries , like areas of Western Europe, North America and East Asia, have a more developed technology and industry base with more funding available for information infrastructures such as cabling and high-speed access . Developing countries , like areas of Africa and Central Asia, have unstable governments and slower access (if any) to the internet . Less money is spent on technology and improving broadband speed and expensive equipment like computers cannot be purchased on low wages . Urban vs. Rural Urban locations like towns and cities have a high population density . Because there are so many people, councils and IT companies will spend a lot of money on internet infrastructure such as cabling and installing high-speed lines . In Rural locations like the countryside, the population is sparse and settlements may be far apart so internet access is poorer and broadband speeds are slower . This means accessing information on the internet is more difficult . Internet Access from Remote Locations Remote locations (such as the countryside or difficult-to-reach areas like mountains or deserts) might have limited internet access . Fast fixed broadband is expensive to install and many providers simply won't invest in rural areas as it is not economically viable . Some areas, usually those with a very small or temporary population, might have no fixed internet access which will make it difficult for an individual or organisation to communicate or work online. Many remote locations have some form of internet but download speeds will be slow or interrupted due to intermittent connection . This makes it difficult to work online and could take a long time to access webpages or document stores. Alternatives to fixed broadband in remote locations include mobile broadband and satellite broadband . Mobile broadband is generally not designed for home use and would be very expensive for everyday use , plus the remote location will generally mean mobile coverage could also be weak . Satellite broadband requires a dish with an unrestricted view of the sky. Satellite broadband has a relatively high internet speed but will cost a lot to install and has a high latency (more chance of experiencing lag). Q uesto's Q uestions 1.1 - Holders of Information: 1a. State the 7 categories of information holders . [7 ] 1b. For each of the 7 categories , briefly describe 3 different pieces of information that may be stored by the information holder. For example, a charity may store the financial information of donors. [3 each ] 2. What is the digital divide ? [2 ] 3. Describe the differences in information access for the following locations : a. Developed vs. developing countries b. Urban vs. rural areas c. Remote locations [4 each ] Topic List 1.2 - Storage Media

  • 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 ➡

  • OCR CTech IT | Unit 1 | 4.5 - Job Roles | CSNewbs

    Learn about the different skills and attributes that are required for IT roles including a network manager, programmer, animator and technician. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification. 4.5 - Job Roles Exam Board: OCR Specification: 2016 - Unit 1 There are several different IT-related roles within most companies. Each role requires specific skills and attributes to be performed successfully. Try to apply the most suitable personal attributes that were described in 4.3 , as well as any other important skills relevant to the role , such as programming. Self-motivation Leadership Respect Dependability Punctuality Problem Solving Determination Independence Time Management Team Working Numerical Skills Verbal Skills Planning & Organisation Network Manager A network manager must control a group of employees with strong leadership to clearly set out their vision for the team. They must be able to motivate and encourage the team members to meet objectives . Because a network manager is high-ranking, there may not be many senior staff above them so they must be self-motivated and able to complete tasks independently , without being monitored . Network managers must be dependable and decisive , able to weigh up the consequences of a decision and make tough calls whilst under pressure . Time management is an important attribute for a network manager, they must be able to prioritise tasks and ensure deadlines are kept to . IT Technician IT technicians must have good interpersonal skills so that they can communicate clearly with other employees or customers. They should be able to use simplified terminology to help another person with their problem. They must be able to use questioning effectively to work out what the issue is to begin to solve it. IT technicians should have plenty of experience with hardware and software troubleshooting and be able to use a range of troubleshooting tools to solve a problem. They need to be respectful to customers and employees when solving a problem and show determination , as well as self-motivation , to fix issues within acceptable time limits . Programmer A programmer needs to be competent in specific programming languages that the company use. It would be beneficial to have knowledge of more than one programming language so they can be more versatile and approach a problem in different ways . Programmers need to have a logical mind so that they are able to creatively solve problems. Using computational thinking is an important set of skills that programmers should have - for example, by using decomposition to break a large problem into smaller, more manageable chunks. They must have good planning and organisational skills so that they can stay on top of the numerous tasks that need to be done. They need good time management skills to prioritise the more important tasks and stick to a deadline . Programmers must be patient individuals, all programs will contain errors that must be debugged and rewritten numerous times. Good interpersonal skills are necessary so programmers can work efficiently in teams - often multiple programmers will work on subsections of the same program that fit together later. Web Designer & Animator Web designers create , plan and code web pages to fit specific requirements made by their customers. They must create both the technical and graphical aspects of the web page, editing both how it looks and how it works. Web designers could also be responsible for maintaining a site that currently exists. They would need to have sufficient knowledge of using HTML (HyperText Markup Language ) for the structure and content of the webpage and CSS (Cascading Style Sheets ) for the formatting and style . An animator may use a mixture of digital and hand-drawn images or even puppets and models. The main skill of animation is still artistic ability , but there is an ever-increasing need for animators to be experienced with technical computer software . Animators usually work as part of a team with strict deadlines . Q uesto's Q uestions 4.5 - Job Roles: 1. Describe the key skills and personal attributes that a new programmer should have. [10 ] 2. A brief job description of a web designer and an animator are shown above on this page. Use the descriptions of what makes a suitable network manager, IT technician and programmer to help you explain which personal attributes and skills are required for: a) A web designer b) An animator [8 each ] 4.4 - Ready for Work Topic List 4.6 & 4.7 - Bodies & Certification

  • Python | Extended Task 4 | CSNewbs

    Test your ability to create a more complex program in Python based on a given scenario. Perfect for students learning GCSE Computer Science in UK schools. Extended Task 4 Hi, Jacob Mortimer here from Cats & Dogs Veterinary Surgery . There was a flood last week, and our computer systems were totally destroyed . I need you to create a program , using a file , that allows my receptionist to: Add new animals to the file . Search through the file and print the details of a specific animal . Allow a specific animal to be removed from the file . Vet Surgery For this task, you will need to create a document and include the following sections (with screenshots where appropriate): An introduction to explain the Purpose of your program . A List of Requirements for a successful program. Screenshots of your code (with comments in your code to show understanding). Testing – Create a plan to show how you will test your program and then explanations of any errors that you found and how they were fixed . An Evaluation of what worked, what didn’t, and how you met each of your requirements from your original list. Also, discuss further improvements that you could have made to improve your program. Reminders for this task: You will need to create a selection of options for the user to choose from. Subroutines and a while true loop may help. Section 10 will help you to open, write and read from files . Section 10c shows how to edit data in a file. You will need to adapt this code and not write the line that has been selected, instead of writing a modified version of it. There are multiple ways to approach this program, and your solution might look different from the example. Break the problem down and focus on one part at a time. Example solution: Entering 1 allows the user to enter the details of a new animal which is saved into the file . Entering 4 will stop the loop and ends the program. Entering 2 allows the user to enter the details of an animal to search for . If the animal is in the file, their details are printed clearly on a new line. Entering 3 allows the user to enter the details of an animal to remove from the file . If the animal is in the file, all lines are transferred into a temporary file except for the line to be removed . ⬅ Extended Task 3 (Blackjack) Extended Task 5 (Colour Collection) ➡

  • App Inventor 2 | Pop-up Blob | CSNewbs

    Learn how to use App Inventor 2 to create simple programs. Try to complete the final task (7) on this page. Perfect for Key Stage 3 students to experiment with block coding, objects and properties. App Inventor Task 7 - Pop-up Blob The previous apps have been preparing you to make a longer and more complicated app. Now we will put together all of the skills you have learned to create a fun game. Check the video: Open App Inventor 2 (use the button below) and create a new project. You will need to log in with a Google account. App Inventor 2 Ready for a challenge? This is what the program looks like in Designer layout. To the left are the components with all their Properties correct. To the right are the Components names. Put the three labels and button inside a HorizontalArrangement from the Layout section of Palette . The Text for ScoreLabel is 'Score: 0'. The Text for TimeRemainingLabel is 'Time Remaining:'. The Text for SecondsLabel is '20'. Place an ImageSprite inside a Canvas (both from the Drawing and Animation section of Palette ). Download the blob image from the Basics page here and upload it as the Picture for the ImageSprite . Change to Blocks layout and drag a initialize global to block from Variables . Type 'Score' in the empty space to create a variable that we will use to track how many times the blob has been touched. Attach a 0 block from Math to start the score at 0. This big block of code uses some of the concepts which you have used before. Whenever the Blob is touched the variable Score is increased by 1. The X and Y coordinates of the Blob are changed by random numbers so it will appear in a random location on the screen. The bottom blocks change the ScoreLabel to show the current score. Every second that the timer ticks we want to check if the score is more than 1 (to check it hasn't reached 0). If it is more than 1 second then the time will count down by 1. In the else part you need to add the following: Set Blob Enabled to false . Set Blob Visible both to false . Set TimeRemainingLabel Visible to false . Set SecondsLabel Visible to false . When the Reset Button is clicked the score variable is changed to 0 and the Seconds label is rewritten to 0. Make sure you use the " " block from Text and not a block from Math. Inside the when ResetButton Click block you need to reverse the code you have added for the else block when the timer ticks: Set Blob Enabled to true . Set Blob Visible both to true . Set TimeRemainingLabel Visible to true . Set SecondsLabel Visible to true . Extra Step: Challenges 1. Large score display . If you watch the video at the top of the page again, you will see that when the time runs out (is less than 1) some of the labels turn invisible and the TextColour and FontSize of the ScoreLabel changes. Try to do the same in your app. Remember to reverse what you have done in the code for the reset button; otherwise, the labels will still be invisible! 2. Customise your game . Change the background of the Canvas to an image, change the blob to a different image and add a sound when the character is 'popped'. 3. *HARDER Challenge* Add a High Score Label . Follow these hints carefully and use the colours to help you. You need to initialize a new Variable called HighScore and set it to 0 . You also need to add a new HighScoreLabel and put it in your Horizontal Arrangement in Designer layout. Add an if then block in the else part of the When Timer Timer block you already have. If Score > HighScore then HighScore = Score . This will change the value of HighScore to the current Score if it is higher than the current high score. Remember to make the HighScoreLabel display the new HighScore . KS3 Home

© CSNewbs 2026

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