Search CSNewbs
304 results found with an empty search
- 1.1b - Registers & FE Cycle - OCR GCSE (J277 Spec) | CSNewbs
Learn about key registers used in the fetch - execute cycle such as the program counter and current instruction register. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). 1.1b: Registers & The F-E Cycle Exam Board: OCR Specification: J277 Watch on YouTube : Registers in the FE Cycle Reading instructions The fetch - execute (F-E) cycle is performed by the CPU millions of times every second. This cycle is how the CPU processes data and instructions for each program or service requiring attention . Important Registers A register is a small storage space for temporary data in the CPU . Each register has a specific role . There are four essential registers used in the F-E cycle : Program Counter (PC) A register that tracks the RAM address of the next instruction to be fetched . Memory Address Register (MAR) Stores the RAM address of the current instruction (or data ) the CPU needs to access . Memory Data Register (MDR) The MDR stores the instruction that has been transferred from RAM to the CPU . Accumulator (ACC) The ACC stores the result of mathematical or logical calculations . The PC , MAR and MDR are used in the fetch stage , whereas the ACC is used in the execute stage . The PC and MAR store an address (a memory location in RAM ) whereas the MDR and ACC store data (a value ). Fetch - Execute Cycle The essential idea of the F-E cycle is that instructions are fetched from RAM , to be decoded (understood) and executed (processed) by the CPU . 1. The Program Counter (PC ) register displays the address in RAM of the next instruction to be processed . This value is copied into the Memory Address Register (MAR ). 0054 2. The PC register is increased by 1 . This prepares the CPU for the next instruction to be fetched. 0055 3. The CPU checks the address in RAM which matches the address held in the MAR . 0054 4. The instruction in RAM is transferred to the Memory Data Register (MDR ). MDR 5. The instruction is decoded by the contol unit which splits the instruction into an opcode (an action ) and an operand ( data or address ). 6. The instruction i s executed (run). Any result of an execution is stored in the Accumulator (ACC ) register, such as calculations made by the ALU . ACC 7. The cycle repeats by returning to the first step and checking the program counter for the address of the next instruction . Q uesto's Q uestions 1.1b - Registers & The F-E Cycle: 1 . What is the purpose of the registers ? [1 ] 2 . Describe the purpose of each register : a. The Program Counter (PC) [ 2 ] b. The Memory Address Register (MAR) [ 2 ] c. The Memory Data Register (MDR) [ 2 ] d. The Accumulator (ACC) [ 2 ] 3. Draw a diagram with icons and words to show the steps of the Fetch - Execute cycle . [7 ] 1.1a - The CPU Theory Topics 1.2 - CPU Performance
- 1.2 - Operating Systems | F160 | Cambridge Advanced National in Computing | AAQ
Learn about network operating systems, open source operating systems and proprietary operating systems. Resources based on Unit F160 (Fundamentals of Application Development) for the OCR Cambridge Advanced Nationals 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.2 - Operating Systems Watch on YouTube : Network Operating System Open Operating System Proprietary Operating System An operating system is software that manages the resources of a computer system , such as memory , users and files . It also provides a user interface so that humans can interact with the device's hardware . An operating system allows application software to be opened and run . There are three types of operating system that you need to know - network , open and proprietary . Operating Systems Network Operating System (NOS) A network operating system (NOS ) is software that manages network resources and allows computers to communicate over a network . Windows Server , developed by Microsoft , is an example of a network operating system . Characteristics of a Network Operating System Allows for the centralised management of users , data and security across multiple devices on a network . Enables resources such as files , applications and printers to be shared over the network . Manages user authentication and permissions control . Oversees remote access and system monitoring tools . The main type of device that uses a NOS is a server . Other devices, such as desktops or laptops , connect to the server to access shared resources . Windows Server is an example of a popular NOS . Advantages of a Network Operating System Administrators can manage users , files and security on a network from one central location . Resources such as files , printer access and applications can be shared across the network . Access levels can be controlled and user authentication helps protect data . An NOS is scalable - more devices and users can be added as needed . Central servers managed by a NOS make it easier to back up and restore important files . Disadvantages of a Network Operating System Purchasing a NOS and maintaining the servers it runs on can be expensive . Setup and management is complex and may require skilled administrators . If the main server running the NOS fails , connected computers may lose access to resources . Heavy traffic or poor configuration could slow the network down . Who uses a Network Operating System? Application developers can use a NOS to build , test and manage apps that work across networks , such as web applications , multiplayer games or cloud tools . This type of operating system is also used by organisations that need to manage multiple devices , users and resources efficiently across a network , such as a small business or a school . Open Operating System An open operating system is open-source , meaning its source code is freely available for anyone to view , modify and distribute . Source code is the original set of instructions written by a programmer using a high-level language such as Python , Java or C++ . Characteristics of an Open Operating System Users have access to the source code and can see how the OS works . The source code can be modified to suit the specific needs of the user . Development and maintenance may be led by an online community . An open OS is usually free with no licensing costs for most versions. Linux is an example of an open operating system . Android is technically an open-source OS , but most commercial Android devices (like Google Pixel phones ) include proprietary components (like Google Docs or Gmail ), which makes the full system not completely open source . Advantages of an Open Operating System It is usually free to use , modify and distribute the source code . Because the source code can be seen and modified , this type of OS is flexible and customisable . There may be updates from an online community maintaining and improving the software . Promotes experimentation to learn how systems work and try new ideas . Disadvantages of an Open Operating System Programming knowledge and skills are required to modify the source code . There may be security risks if someone edits the source code and redistributes it with malicious code . There will be less official support compared to a proprietary operating system . Some proprietary applications (like Microsoft Access for databases) will only work on a proprietary OS (like Windows ). Who uses an Open Operating System? App developers would use an open OS when the device their application will be used on is not tied to a specific proprietary system (like Windows or MacOS ). For example, a charity making a free educational app for developing countries would choose an open OS so it can run on low-cost , older smartphones . It can be customised and tested on a range of devices . Applications for specific single-purpose systems would also use an open OS , such as an information terminal in a museum . Linux could be used to develop a simple user interface and remove unnecessary features . Proprietary Operating System A proprietary operating system is software that is owned by a company or individual and the source code is not accessible for users to view , modify or distribute . Users must typically buy a licence or agree to the terms of use . Characteristics of a Proprietary Operating System The source code is hidden from the user and cannot be legally modified . A paid licence or subscription is usually required to use the software . It may be maintained and updated by the developer(s) who own it . Only the developer controls updates and the features that are added or fixed . Examples include Microsoft Windows (e.g. Windows 11 ), macOS (for Apple desktops and MacBooks ), iOS (for iPhones ) and iPadOS for iPads ). Advantages of a Proprietary Operating System There is an expectation that it is user-friendly and has been well tested . There may be official support and regular updates for improvements and bug removal . A proprietary OS has a high compatibility with proprietary software such as Microsoft Office or Adobe editing apps . The OS is expected to be stable and secure , with access restricted to system files . Disadvantages of a Proprietary Operating System A paid licence to use the OS is often required , which may be expensive . There is limited customisation for users as the source code cannot be seen or modified . Users rely on the vendor (developer ) for updates and bug fixes . Some proprietary OS are designed to only work on specific hardware (such as iOS only working on iPhones ). Who uses a Proprietary Operating System? App developers will need to use a proprietary OS if they are developing applications for a device that requires a specific proprietary OS , for example if they are creating a game for iPhones , they will need to use iOS . A company designing a finance application on desktops with Microsoft Access and Microsoft Excel must use a proprietary OS like Windows so that it can be integrated with these other types of proprietary applications . Q uesto's Q uestions 1.2 - Operating Systems: 1. What is an operating system ? [2 ] 2. For each of the three types of operating systems , create a poster , information sheet or factfile which includes the following information : Characteristics Advantages Disadvantages Example of how it could be used [10 per OS ] Windows 11 is Microsoft's current operating system . Windows 1.0 was their first release, introduced in 1985 and included basic versions of Calculator , Notepad and Paint . D id Y ou K now? 1.1 - Programs & Applications Topic List 1.3.1 - Application Types
- OCR CTech IT | Unit 1 | 4.6 & 4.7 - Bodies & Certification | CSNewbs
Learn about the purpose of professional bodies and IT industry certification. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification. 4.6 & 4.7 - Bodies & Certification Exam Board: OCR Specification: 2016 - Unit 1 What is a professional body? A professional body is an organisation that seeks to develop and support workers in a certain profession. Professional bodies will share best practice , help people starting in the profession and support any role-related learning . In the UK a popular professional body is the British Computer Society (BCS) - also known as the Chartered Institute for IT - with over 65,000 members. What is industry certification? Professional bodies exist to provide trainees with industry certification . Industry certifications are qualifications in different areas of expertise so applicants are trained with up-to-date knowledge and skills . Two popular organisations that administer industry certifications in America are Cisco and CompTia . Cisco's website claims that they provide "certifications for all experience levels covering topics in networking , security , collaboration , and more. Cisco's certification program can meet you where you are on your learning journey and take you to where you want to go." Advantages of Industry Certification Disadvantages of Industry Certification Develop IT skills: Trainees develop experience and competency in areas relevant to actual jobs. Access resources: Trainees are part of a network of like-minded professionals with access to help from experts . P rofessional development opportunities: Trainees are invited to special events and seminars to ensure skills remain up-to-date . Cost: Training for industry certification can cost hundreds or even thousands of pounds and is often self-funded . No guarantees: Earning a certificate doesn't guarantee you a better job or more money. Time and dedication: Like other qualifications, classroom activities or online learning must be completed. Exams must be passed at the end of the course. Many organisations now require IT employees to have earned relevant industry certifications . This is so that the organisation can be confident that the employee has been appropriately trained and will have gained experience at the required level for the certification. The employee should be able to demonstrate technical knowledge as a result of gaining the certification. Q uesto's Q uestions 4.6 & 4.7 - Bodies & Certification: 1a. What is a professional body ? [1 ] 1b. State 3 roles of a professional body . [3 ] 2. What are industry certifications ? [2 ] 3. Describe 3 advantages and 3 disadvantages of an IT worker earning industry certifications . [2 each ] 4. Why do many IT organisations require its employees to have earned industry certifications ? [4 ] 4.5 - Job Roles Topic List 5.1 - Ethical Issues
- OCR CTech IT | Unit 1 | 1.2 - Computer Components | CSNewbs
Learn about required internal hardware including the CPU, motherboard and PSU. Find out about ports and expansion cards. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification. 1.2 Computer Components Exam Board: OCR Specification: 2016 - Unit 1 This page describe the various components inside of computer systems . The first three are necessary in every type of computer: Processor Motherboard Power Supply Unit The main role of a processor is to manage the functions of a computer system by processing data and instructions . The primary processor of each computer system is the Central Processing Unit ( CPU ). A processor is attached to the motherboard using a connection point called a CPU socket . The motherboard is the main circuit board of a computer on which components such as the CPU and ROM are connected . The motherboard contains PCI slots for expansion cards and ports for external devices to be connected . The power supply unit (PSU ) converts electricity from AC (Alternating Current) from the mains power supply to DC (Direct Current) which the computer system can use . The PSU of desktop computers is internal whereas portable devices require an external 'charger '. Memory Computer memory is split into two types - volatile and non-volatile . Volatile storage is temporary (data is lost whenever the power is turned off ). Non-volatile storage saves the data even when not being powered , so it can be accessed when the computer is next on and can be stored long-term . Random Access Memory (RAM) Read-Only Memory (ROM) Cache Memory RAM is volatile (temporary) storage that stores all programs that are currently running . RAM also stores parts of the operating system to be accessed by the CPU. RAM is made up of a large number of storage locations, each can be identified by a unique address . ROM is non-volatile storage that cannot be changed . ROM stores the boot program / BIOS for when the computer is switched on. The BIOS then loads up the operating system to take over managing the computer. Cache memory is volatile (temporary) storage that stores frequently accessed data . It is very quick to access and faster than other types of memory like RAM because it is stored on the processor itself. RAM ( R andom A ccess M emory) ROM ( R ead O nly M emory) Cache Memory Secondary Storage Magnetic Storage 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 . X - Optical discs have the Slowest ACCESS SPEED . Magnetic Disks are spelled with a k and Optical Discs have a c. Magnetic Storage Characteristics: ✓ - Large CAPACITY and cheaper per gigabyte than solid state . X - Not DURABLE and not very PORTABLE when powered on because moving it can damage the device. ✓ - Relatively quick ACCESS SPEED but slower than Solid State . 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. A magnetic hard disk drive (HDD ) is a 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. Hard disk drives can also be external and connected through a USB port . 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 . Solid State Storage Cloud Storage When you store data in 'the cloud ', using services such as Google Drive, 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 typically free for a certain amount of storage and users can buy more storage space when they need it - the scalable nature of this storage type makes it very flexible for businesses. 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 . Cloud storage is also known as 'virtual storage ' because the data is saved remotely , freeing up physical storage space for users on their own devices . 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. Solid State Characteristics: X - High CAPACITY but more expensive 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 . Storage Protocols SCSI ( Small Computer System Interface ) is a protocol (set of rules) for attaching external devices to a computer system, such as a printer, storage drive or scanner. SAS ( Serial Attached SCSI ) is an improved version of SCSI that enables many more external devices (up to 128) to be connected at the same time to a computer system. Expansion Cards Expansion cards are dedicated circuit boards with a specific purpose that are attached to the motherboard . Most of the following expansion cards can also exist as integrated components on the motherboard, rather than a separate card. Graphics Card Sound Card Processes graphical data (e.g. videos or animations) and converts it into a displayable output on a monitor . Network Interface Card (NIC) 0010 1011 0101 0101 0110 0111 0101 0001 0101 Sound cards convert analogue sound waves into digital data (binary) when inputting audio through a microphone. Sound cards also convert digital data (binary) into analogue sound waves to output audio through speakers or headphones. 0010 1011 0101 0101 0110 0111 0101 0001 0101 Allows computers to connect to networks (such as the Internet ) and enables them to transfer data to other computers. Transfers data between servers across a network. Fibre channel allows for quick transfer speeds and is primarily used to connect data storage to servers in large data centres. Fibre Channel Card Storage Controller Card Required for the computer to manage and use any attached storage devices . Ports A port is the interface between external devices and the computer . Ports allow data to be transferred from and to these devices. USB Port Connects storage devices such as USB sticks or external hard drives . Connects input devices such as a keyboard or mouse, as well as other devices for data transfer such as a camera or smartphone. Ethernet Port Connects computers to network devices such as a modem or router, allowing access to the internet . FireWire Port Developed for Apple products, FireWire transfers data at a high speed from devices such as camcorders and external hard drives . FireWire supports isochronous devices , meaning data is sent in a steady , continuous stream . SATA Port Allows fast data transfer to external HDD , SSD or optical drives . SD Port Enables data from an SD card to be transferred from a device like a camera to the computer. Micro SD Port Allows data from a micro SD card to be transferred from devices such as smartphones , tablets and handheld games consoles to a computer. Q uesto's Q uestions 1.2 - Computer Components: Vital Components: 1. Describe the purpose of the following components : a. The CPU (Central Processing Unit ) [2 ] b. The motherboard [2 ] c. The PSU (Power Supply Unit ) [2 ] Primary Memory: 2a. What is the difference between primary and secondary memory ? [2 ] 2b. What is the difference between volatile and non-volatile storage ? [2 ] 2c. For each of the three types of primary memory , describe its role and give an example of what it can store. [6 ] Secondary Storage: 3a. For magnetic , optical and solid-state storage rank these three secondary storage mediums in terms of capacity , durability , portability and speed . [9 ] 3b. For the following scenarios justify which secondary storage medium should be used and why it is the most appropriate : Sending videos and pictures to family in Australia through the post. [3 ] Storing a presentation to take into work. [3 ] Storing project files with other members of a group to work on together. [3 ] Backing up an old computer with thousands of file to a storage device. [3 ] Additional Components: 4a. State the purpose of five different expansion cards . [5 ] 4b. What is the purpose of the motherboard ? [2 ] Ports: 5a. Describe the six different ports . [6 ] 5b. What is the difference between SCSI and SAS ? [2 ] 1.1 - Computer Hardware Topic List 1.3 - Computer System Types
- GCSE Key Terms | CSNewbs
A key term generator to display randomised or sequential terms from the OCR GCSE Computer Science (J277) course. Filter terms by topics and 'favourite' tricky terms to focus on later. Perfect for students learning GCSE Computer Science in UK schools. GCSE Key Terms Generator If you see this message, your school may be using a strict network filter which has blocked it. The tool uses basic JavaScript and should work fine on a home network. Use this tool to check your understanding of the OCR GCSE J277 specification's key terms . OCR GCSE Homepage
- HTML Guide 3 - Text Tags | CSNewbs
Learn how to use tags to format text in HTML, including how to underline, italicise and embolden text. Also, learn about heading size and paragraphs. 3. Tags for Text HTML Guide Watch on YouTube: Remember to write the tags for everything you want the user to see between the and tags. Headings Time to add text to your web page such as headings and paragraphs. To write a large heading , use and To write headings in a smaller size, use numbers between 1 and 6. Add a large heading and a sub-heading to your webpage. paragraph Paragraphs Typing text between the and tags will create a paragraph . Add at least three different paragraphs to your webpage. bold underline italics Bold, Underline & Italics You can format your text by changing it to be bold , underlined or italicised (slanted). Now you have text on your web page, you can add hyperlinks to take viewers to different websites. In the paragraphs you have already written, add at least 1 bold tag, 1 underline tag and 1 italics tag. 2. Essential Tags HTML Guide 4. Hyperlinks
- Python | Section 4 Practice Tasks | CSNewbs
Test your understanding of selection (if statements) and operators (mathematical and logical). Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python - Section 4 Practice Tasks Task One: Spanish Numbers Create a very simple Spanish translation program. Let the user enter a number between one and four then print the Spanish word for that number using if , three elif s and else . One in Spanish is uno , two is dos , three is tres and four is cuatro . If they enter anything else print “I only know 1 to 4 in Spanish!” . Example solutions: Enter a number between 1 and 4: 3 tres Enter a number between 1 and 4: 5 I only know 1 to 4 in Spanish! Task Two: School Trip A school is organising a trip to Alton Towers . The coaches they are hiring can fit 45 people . Enter the total number of people going on the trip and work out how many coaches will be full (using integer division ) and how many people will be left over on a partly full coach (using modulo division ). Example solutions: How many people are going on the trip? 100 There will be 2 full coaches and 10 people on another coach. How many people are going on the trip? 212 There will be 4 full coaches and 32 people on another coach. Task Three: Driving Tractors There are different rules in the United Kingdom for what farmers at certain ages can drive . Ask the user to input their age and then output the relevant information below: Children under 13 cannot drive any tractors. A trained and supervised 13 to 15 year old can drive a low-powered tractor on private flat grass. 16 year olds with a provisional category F licence can drive tractors less than 2.45 metres wide. Young adults from 17 to 20 with the correct licence and training c an drive tracked vehicles that weigh less than 3,500kg. Adults over 21 years old , with the correct licence and training, can drive all types of tractor. Note: Always be safe around machinery in farms regardless of your age. Driving without adequate training and a licence is illegal. Example solutions: How old are you? 8 You cannot drive any type of tractor. How old are you? 13 If you are trained and supervised you can drive a low-powered tractor on private flat grass. How old are you? 19 With the correct licence and training you can drive tracked vehicles that weigh less than 3,500kg. Task Four: Avoid the Three Choose a category like planets , people in your class or months of the year. Secretly choose three of them . Ask the user to enter a word in your category. If they enter one of the three that you chose, they lose . Example solutions: I have secretly selected three months you must avoid! Enter a month of the year: April AHA! You chose one of the secret months, you lose! I have secretly selected three months you must avoid! Enter a month of the year: December Well done, you didn't choose one of my three! ⬅ 4c - Logical Opera tors 5a - Random ➡
- OCR CTech IT | Unit 1 | 5.5 - Digital Security | CSNewbs
Learn about digital methods of protecting data such as anti-malware, firewall, usernames and passwords, levels of access and encryption. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification. 5.5 - Digital Security Exam Board: OCR Specification: 2016 - Unit 1 ****** Usernames & Passwords Usernames must be matched with a secure password to minimise the chances of unauthorised users accessing a system. Passwords should contain a mix of uppercase and lowercase letters , punctuation and numbers . Passwords should be of a substantial length (at least 8 characters) and should be regularly changed . Digital Security Measures Firewall Firewalls (see 2.3 ) prevent unauthorised access to or from a network . Firewalls filter data packets and block anything that is identified as harmful to the computer system or network. Firewalls can also be used to block access to specific websites and programs. Encryption Encryption is the conversion of data ( plaintext ) into an unreadable format ( ciphertext ) so it cannot be understood if intercepted . Encrypted data can only be understood by an authorised system with a decryption key . Anti-Malware Anti-virus software (see 2.3 ) scans a system and removes viruses . If left to infect a system a virus could delete data or permit access to unauthorised users . Anti-spyware software removes spyware on an infected system so hackers cannot view personal data or monitor users. Organisations should install and regularly update anti-virus and anti-spyware programs. Permissions Permissions is the creation of different levels of file access so that only authorised people can access and change certain files . There are different levels of file access : No access Read-only Read/write Q uesto's Q uestions 5.5 - Digital Security: 1a. Describe why usernames and strong passwords are necessary. [2 ] 1b. State 3 rules for choosing a strong password . [3 ] 2. Describe the purpose of anti-virus and anti-spyware software. [4 ] 3. Describe the roles of a firewall . [4 ] 4. Explain what encryption is. [3 ] 5. What are permissions ? What are the 3 levels of access ? [5 ] 5.4 - Physical Security Topic List 5.6 - Data & System Disposal
- 2.1 - Information Styles | Unit 2 | OCR Cambridge Technicals | CSNewbs
Learn about the wide range of style data and information can be presented in, both digitally and physically. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification for Unit 2 (Global Information). 2.1 - Information Styles Exam Board: OCR Specification: 2016 - Unit 2 There are many different ways that information can be styled and presented , both on-screen and physically . There are many more benefits and limitations to using each information style but some key ideas have been described below. T Text Text is a written (or typed ) format of information. ✓ Text provides detailed summaries and explanations . ✓ The format of text can be changed to suit its purpose (e.g. include bullet points or different colours). ✓ Text can be written in different languages so that all literate people can understand. X Large amounts of text can be difficult and time-consuming to read. It is generally less engaging than most other methods. X Text may include spelling errors or be factually incorrect . Graphics Graphics are a visual form of information. Examples include logos , photographs and diagrams . ✓ Graphics are multilingual - they can be understood by anybody regardless of their spoken language. Companies like IKEA will use the same graphics globall y . ✓ Graphics can present an idea or message immediately and can use associations (e.g. the colour red is associated with temperature or anger). ✓ Graphics are a more engaging method of presenting information than text. X Images may take longer to load over a data-restricted network, for example, images in an email may not be automatically downloaded. Video Videos are visual formats of information, often with audio . ✓ More engaging and easier to follow than reading large amounts of text. ✓ Videos can be used to convey a message in a short space of time , e.g. television adverts. ✓ Audio can be added to videos such as music for engagement or narration to explain a process. X Videos usually take up a relatively large amount of storage space , longer videos may take time to upload / download / transfer along a network. X Videos take a long time to create including filming, editing and narration. Animated Graphics Animated graphics are images with multiple frames , such as an animation of the heart showing individual steps that a user can pause and step through in their own time. ✓ Can be used to show a process and is easier to understand than reading text. ✓ Can be understood by all ages and language speakers . X Creating an animated graphic takes time to create , especially educational resources with multiple frames and annotation. 9 Numerical Numerical information is represented by numbers . This can include a wide array of different information including statistics, financial data, dates, ages and distances . ✓ Statistical data is easier to understand and manage in a numerical format than standard text - 234,567 is simpler to work with than "two hundred and thirty-four thousand, five hundred and sixty-seven". ✓ Numerical data can be exported into spreadsheets and presented as graphs to visualise the dat a . X Long numbers can be entered by humans incorrectly and lead to incorrect results . X Formatted data like telephone numbers cannot be stored as numerical because numerical does not allow spaces and does not allow the number to start with 0 . Audio Audio is an information type using sound waves. A common form of audio is music , such as the millions of tracks stored in music libraries like Spotify and YouTube. Non-music examples include spoken instructions and podcasts . ✓ Users can listen to information when they are otherwise busy and could not read, such as when walking or driving. ✓ Visually impaired users who are unable to read can still hear audio and interact with voice recognition software . ✓ Some users prefer listening to instructions rather than reading text . X Audio may not be suitable in some environments e.g. noisy areas . X Words may be misheard and misunderstandings made, possibly due to pronunciations or accents. Tactile Images Tactile images are a form of physical information that can be interpreted by touch . Specialist software is used to create raised lines on paper that people can experience by touching . Geographers can create 3D physical objects of environments such as valleys or volcanoes. This allows researchers and land surveyors to have a better understanding of a geographic area. ✓ Users can better understand a physical environment or prospective design if it is physically built. ✓ Visually-impaired users can feel the object instead of being able to see it. ✓ The tactile image can be used as a prototype for a target audience to feel and comment on. X It is difficult to share a tactile image without physically moving it, unlike digital or paper information styles. X Creating a tactile image requires specialist equipment like a 3D printer. *screams* Subtitles Subtitles are a textual form of information that can be shown along with visual data such as a video. Subtitles are written to transcribe audio , such as speech, into words . ✓ Hearing-impaired users can access audio information formats such as video by reading the subtitles. ✓ Subtitles can be used in noisy environments or when sound cannot be played. ✓ Subtitles can be used for translated speech , such as in promotional videos or television programmes. X Auto-generated subtitles are often incorrect . X Subtitles written by a human take a long time to type up and sync in time with the audio. Tables & Spreadsheets Tables and spreadsheets can store both numerical and textual data ready for analysis . Examples include simple database tables and financial spreadsheets of a company's profits this year. Microsoft Access is an example of database software that uses tables and Microsoft Excel is an example of spreadsheet software. When using spreadsheets (or databases) records can be locked ('record locking' ) so that only one person can make edits at any one time . Edits will be saved before unlocking the file. This will stop data being incorrectly overwritten and will ensure that the data in the spreadsheet is up-to-date , accurate and fit for purpose . Spreadsheets can be linked to other documents such as forms to directly import data from. This data can be ordered into different groups and conditional formatting can be used to automatically organise and style the data. Graphs and charts can be created using values stored in a spreadsheet to easily visualise the data . Modelling can be used to see the effect of variable changes (e.g. will raising the price of one product affect overall profit?). Database tables use queries (advanced searches) to find and display data based on given criteria (such as all males under 35). Mail merge can be used to automatically send emails to the customers highlighted in the query . A report can be generated from the query results to display the information in a structured format . This can be used to make decisions and analyse data . Boolean Boolean is a data type that can only have one of two specified values . These values are most commonly 'True' and 'False' or sometimes 'yes' and 'no'. Braille Braille is an example of a tactile image that can be physically touched . Braille characters represent letters or numbers that can be 'read' by touch - used primarily by those with visual impairments . Devices like braille terminals convert characters on a screen into braille, line-by-line so that blind people can understand the information through touch . A braille printer is used to output braille dots onto paper. ✓ Allows visually impaired users to interact with a computer system using a braille terminal . ✓ A braille printer can print documents written using braille to be given to blind people to 'read'. X Braille terminals can only display a limited amount of information at a time. X Braille is not used by many people except visually impaired people so few resources are written using braille. Charts & Graphs Charts and graphs can be used to present numerical data in a format that is easier to visualise and understand . They can be labelled to show different data values and they make it easier for viewers to identify trends and make comparisons between data. Large quantities of data, like census results, are easier to visualise in a graph than reading huge tables of numbers. ✓ Charts present numerical data in a format that is easier to visualise and understand . ✓ Charts and graphs can summarise information into one image data that would take paragraphs to explain in text. ✓ Displaying information in a graph allows users to easily identify trends and make comparisons between data . X Charts can be misleading or can display incorrect information if the numerical data is wrong. Q uesto's Q uestions 2.1 - Information Styles: 1. Describe the following information styles : a. Tactile Images [2 ] b. Braille [2 ] c. Boolean [2 ] 2. Describe two advantages and two disadvantages for each of the following information styles : a. Text [8 ] b. Graphics [8 ] c. Video [8 ] d. Animated Graphics [8 ] e. Numerical [8 ] f. Audio [8 ] g. Tactile Images [8 ] h. Subtitles [8 ] i. Braille [8 ] j. Charts & Graphs [8 ] 3a. Spreadsheets and database tables can be record locked . Explain what record locking is and why it is used . [4 ] 3b. Describe different ways that spreadsheets can be used. [6 ] 3c. Describe different ways that databases can be used. [6 ] 1.7 & 1.8 - Internet Pros & Cons 2.2 - Information Classification Topic List
- 6.1a - Impacts of Technology - OCR GCSE (J277 Spec) | CSNewbs
Learn about ethical, legal, cultural, privacy and environmental impacts of digital technology. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). 6.1a: Impacts of Technology Exam Board: OCR Specification: J277 Watch on YouTube : Impacts of Technology What are the issues created by technology? As the use of computers and technological devices continues to rise every year, this increase brings with it a range of different types of issues . Categories of issues described on this page include: Cultural issues Environmental issues Ethical issues Legal & Privacy issues Cultural Issues Culture relates to society and how different parts of the world vary in terms of computer and internet usage . The Digital Divide This term relates to the gap between those people who have access to modern digital technology (such as computers and the internet) and those who have limited access . 'Limited access' could be devices at home or shared devices or having lower-performance (cheaper) computers and low-speed internet connections. The digital divide can be seen in different ways , such as: People in cities vs. People in rural areas . Younger people vs. Elderly people. Developed countries vs. Developing countries. The digital divide is an important ethical issue because digital technologies have led to numerous international benefits including boosted growth , improved product delivery , enhanced communication and increased opportunities . However, this impact is uneven and these positive impacts are mostly occurring in technologically-advanced regions such as North America , Western Europe and Japan . Regions like some nations in Africa and Central Asia have limited digital infrastructure and government instability , leading to poor internet speeds , high costs and limited resources . Discussion Points: What do you think can be done to bridge the digital divide? Whose job is it to bridge the gap? Who will pay for the technology? Changes to Work The internet , the development of new technologies such as cloud storage and increased video communication have transformed the way that many businesses operate across the world. Staff may be able to work from home or access documents collaboratively outside of the traditional workplace, such as cafes or on public transport. Some jobs have moved abroad to save costs, such as help centres for online issues. Tasks can be outsourced to freelancers in other countries where people are content to be paid less for their time and services. For example, some companies will hire temporary web developers from countries such as India to work for them for a lower salary than local workers. Another change to work that technology has brought is the loss of jobs , especially low-skilled jobs such as factory workers that have seen their roles replaced by technology and automation . However, technology has also created millions of new jobs , including installing and maintaining the machines that replace other roles. Environmental Issues Environmental issues concern the natural world and the negative effects of producing , using and discarding computer systems and devices. Energy and Material Consumption In the past 30 years, the number of technological devices has increased astronomically and thousands of new devices are manufactured each day . These devices need to be assembled using a range of materials , including plastics , metals and some rarer elements and need a considerable amount of electrical power to run. Certain systems like web servers and data centres must be powered on all day , every day, which uses a large amount of energy . Pollution and Waste Generating the electricity to power computers creates pollution - an average PC could require up to 50% more energy per year than a fridge. Computers are difficult to recycle and discarded components can lead to land, water and air pollution due to harmful materials , such as lead and mercury , leaking into the environment. Smartphone trends are also negative for the environment as new devices are released yearly , with minor upgrades that people buy to appear fashionable and up-to-date. To lessen the environmental impact, people should reuse and recycle their devices. Ethical Issues Ethics relates to what is considered right or wrong . Often this is subjective - people may have differing opinions on the issue. Drones Uses of drones: Filming and photography for television, movies and special events. Monitoring pollution levels in the atmosphere. Tracking and monitoring wildlife , such as rhino populations in Africa. Disaster zone response , such as searching for survivors following an earthquake. Delivery companies are developing drones to quickly deliver goods across cities. Drones are used by the military to target sites in other countries, such as American soldiers deploying surveillance drones in Syria. Discussion Points: Should you need a licence to buy and fly a drone? Should drones be used to monitor the public? Like flying CCTV? Should drones be used to deliver items? Like Amazon packages? If a drone hits a plane and it crashes, what should the punishment be? A drone is an unmanned aerial vehicle (UAV ) that is remotely operated and can be used for a wide range of purposes. Self-Driving Cars Self-driving cars (also known as autonomous vehicles ) are currently in the development and testing stage with companies like Tesla and Amazon. Benefits of self-driving cars include: In theory, driving will be safer because cars are less likely to make mistakes that humans do and they can’t become distracted or tired . Self-driving cars should be more fuel-efficient because they take the most direct route to destinations and do not get lost. ‘Drivers’ in the car can perform other tasks instead of driving, such as work or planning. Autonomous vehicles could include trucks and vans to automate the delivery and freight industries . Trucks could drive overnight to deliver goods whereas currently, human drivers must take breaks every few hours. Drawbacks of self-driving cars include: Cars could still crash as code and software processes may fail. The technology is still in development and will be very expensive for the first few years when self-driving cars are available to purchase. Jobs may be lost such as delivery and truck drivers whose vehicles are equipped with self-driving technology. Other industries like motorway services and hotels may also be affected. Discussion Points: Would you trust a car to drive itself? Who is to blame if a self-driving car crashes? The car maker? The people in the car? The software writers? What should happen to the people whose jobs are taken by self-driving vehicles? Artificial Intelligence Artificial Intelligence (AI ) is the act of computers replacing humans to analyse data and make decisions . In recent years AI has become more common in the home and on devices like smartphones; assistants such as Siri and Alexa are prime examples of modern home AI. AI Chatbots like ChatGPT have become more popular in recent years but have lead to issues such as plagiarism , misinformation and breaking copyright laws . The weather today is cloudy. Benefits of AI include: Processes are sped up as computers can analyse large amounts of data much quicker than a human. AI can be used when a human is unavailable , such as using a symptom checker on the internet for a minor illness rather than booking and waiting for a doctor. Repetitive or time-consuming tasks can instead be completed by a computer , such as searching and sorting scientific data or generating ideas , images or audio from a prompt . Drawbacks of AI include: AI can store and process a lot of personal data , especially personal assistants like Alexa which are always listening for ‘wake words’. This data can be viewed by the company that develops it and could be hacked by attackers. AI is programmed by humans and mistakes in code could have disastrous consequences if the AI is used to make important decisions , such as military deployment. AI GPT tools like ChatGPT can give incorrect results , may use copyrighted material in their response and students may use it to submit work that is not their own . Discussion Points: If a robot harms a human who is to blame? The robot? The programmer? The manufacturer? Us? Would you trust a walking, talking robot assistant in your home? Should ChatGPT be banned in schools or can it be helpful? Should AI make decisions for us? Legal & Privacy Issues Legal and privacy issues regard laws that have been introduced by the UK government to protect data, systems and networks from unauthorised access . See 11.2 for explanations about important computing legislation in the UK. Loss of Privacy & Hacking There has been a lot of criticism in the last few years about how internet companies and governments are using personal data to invade privacy and track civilians . Facebook was involved in a scandal with using personal data for reasons that were not the original intention. In reverse, WhatsApp and Apple have been criticised for encrypting messages sent by terrorists that police have been unable to track and read. Every week a new company seems to announce that its data has been hacked . Attackers are constantly using botnets and infected systems to crack poorly secured databases and attempting to phish individuals for usernames and passwords. In the past few years, major hacking breaches include Sony, Yahoo and TalkTalk. Discussion Points: Should the UK government be able to see the websites you have visited in the last year? What should happen if a major company is hacked and bank details are stolen? Should they be fined? Pay customers? Prison? Should WhatsApp allow authorities to access encrypted messages? What if they know a terrorist is using it to communicate? Should the UK debate privacy laws before they go into place? Online Crime Unlawfully obtaining personal information and using it for identity theft or fraud . Harassment and threatening others on social media or private messages; blackmail . Cyber attacks are more common - see 3.8 for information about DOS attacks , IP spoofing , SQL injection and more. Sharing copyrighted material such as television programmes, music and video games. Distributing prohibited material such as drugs or weapons on the dark web. See 6.1b for explanations about different laws that have been created to tackle online crime . The increased popularity of the internet and the rising number of users has led to a wave of online crime , taking many different forms, including: Q uesto's Q uestions 6.1a - Impacts of Technology: Cultural Impacts 1a. What is the digital divide ? [ 2 ] 1b. Describe 2 examples of how the digital divide can be seen . [ 2 ] 2. Describe in detail 3 ways that technology has changed the way people work . [9 ] Environmental Impacts 1. Describe the different ways that the increasing use of technology negatively impacts the environment . [ 5 ] Ethical Impacts 1a. What is a drone ? [1 ] 1b. Make a list of all of the positive impacts and the negative impacts of using drones . You should have at least 3 on each side. [ 6 ] 2. Describe 2 benefits of using self-driving cars and 2 negative consequences . [4 ] 3. Describe how artificial intelligence can be used for good . [ 4 ] Legal & Privacy Impacts 1. A hack on a bank has occurred. Describe what you think the impacts would be on the following groups of people: a. The customers . b. The bank managers . c. The general public . [ 6 ] 2. Describe 4 different types of online crime . [ 8 ] 5.2 - Utility Software Theory Topics 6.1b - Legislation
- 6.1 - Job Roles | F160 | Cambridge Advanced National in Computing AAQ
Learn about the responsibilities of job roles such as an application designer, mobile application designer, project manager, systems analyst, systems designer, user experience designer (UXD) and user interface designer (UID). 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) 6.1 - Job Roles Watch on YouTube : Job roles Developing a new application is rarely a solo project and often involves a team working together . There are seven specific job roles for application development you need to know, from application designer to user interface designer (UID ). For each job role , you must understand its main responsibilities and how it contributes to software application development . Job Roles Application Designer Application designers create the blueprint that guides developers , ensuring the software performs required tasks efficiently and logically . They design the structure and layout of software applications . Mobile Application Designer Mobile application designers ensure the software is suitable and user-friendly on mobile devices . They design apps specifically for mobile platforms (e.g. iOS or Android ) with touch-semsitive interfaces and responsive design . Project Manager Project managers keep the project organised , on track and within budget , making sure all team members work efficiently towards the same goals . They must be organised to effectively plan and oversee the entire software development process . Systems Analyst Systems analysts ensure the final software solves the right problems by fully understanding what users and businesses actually need . They gather and analyse user requirements and identify possible improvements or new system solutions . Systems Designer Systems designers provide the technical structure of the system , ensuring it functions correctly and efficiently under real-world use . They translate requirements into detailed system designs and specify data structures . User Experience Designer (UXD) UXDs ensure the software is pleasant and efficient to use, increasing user satisfaction and reducing errors or frustration . They focus on how users interact with the application and research user behaviour through testing and feedback . User Interface Designer (UID) UIDs make the application visually appealing and easy to navigate , supporting a good first impression and smooth interaction . They design the visual elements including the style of buttons , menus , icons and overall layout . Q uesto's Q uestions 6.1 - Job Roles: 1. Explain how UXDs and UIDs can work together to design applications . [5 ] 2. Describe how systems analysts contribute to application development . [4 ] 3. Describe the responsibilities of two other roles not mentioned in Q1 or Q2 . [ 6 ] There were estimates of about 6,000 developers working together across Rockstar's global video game studios to make Grand Theft Auto VI . D id Y ou K now? 5.3 - HCI Designs & Diagrams Topic List 6.2 - Communication Skills
- 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 ➡







