Search CSNewbs
282 results found with an empty search
- 1.1 - The CPU - Eduqas GCSE (2020 spec) | CSNewbs
Learn about the Central Processing Unit (CPU), the four components within and Von Neumann architecture. Based on the 2020 Eduqas GCSE (WJEC) specification. Exam Board: Eduqas / WJEC 1.1 The Central Processing Unit (CPU) Specification: 2020 + The Central Processing Unit ( CPU ) is the most important component in any computer system. The purpose of the CPU is to process data and instructions by constantly repeating the fetch - decode - execute cycle . CPU Components The control unit directs the flow of data and information into the CPU. It also controls the other parts of the CPU . ALU stands for ‘ Arithmetic and Logic Unit ’. It performs simple calculations and logical operations . The registers are temporary storage spaces for data and instructions inside the CPU. The registers are used during the FDE cycle . Five essential registers are explained in 1.2 . Cache memory is used to temporarily store data that is frequently accessed . Cache memory is split into different levels . Level 1 and level 2 (L1 & L2) are usually within the CPU and level 3 (L3) is just outside it. See 1.3 and 1.5 for more information about cache. You should know: The control unit is also known as the controller and cache memory is sometimes called internal memory . Computer Architecture The way a computer is designed and laid out is known as its architecture . The most common type of computer architecture is Von Neumann . Von Neumann Architecture The CPU is the most important component in Von Neumann architecture as it is constantly fetching and decoding instructions from RAM and controlling the other parts of the system . Von Neumann architecture also stores both instructions and data in memory . Being able to store programs in memory allows computers to be re-programmed for other tasks - this enables it to multitask and run several applications at the same time. Data input and output is another key feature of this architecture. An alternative architecture is Harvard , which features the control unit as the most essential component. Q uesto's Q uestions 1.1 - The Central Processing Unit (CPU): 1a. What does 'CPU ' stand for ? [1 ] 1b. What is the purpose of the CPU ? [ 2 ] 2a. Draw a diagram of the CPU , use the same symbols as shown on this page. [ 4 ] 2b. Label the four main components of the CPU. [ 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 features of Von Neumann architecture . [ 3 ] 4b. Explain why storing data in memory is important. [ 1 ] 4c . State an alternative architecture . [ 1 ] Theory Topics 1.2 - The FDE Cycle
- 3.2 - Project Planning Tools | F160 | Cambridge Advanced National in Computing AAQ
Learn about project planning tools such as the Arrow diagram, Critical Path Analysis (CPA)/Critical Path Method (CPM), Flowcharts, Gantt charts, PERT charts and SWOT (Strengths / Weaknesses / Opportunities / Threats) analysis. 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) 3.2 - Project Planning Tools Watch on YouTube : Project planning tools Arrow diagram Critical path analysis Flowcharts Gantt charts PERT charts SWOT analysis Project Planning Tools Project planning tools help to visualise the project by clearly showing tasks , timelines and dependencies . They also break down complex work into smaller , manageable steps and can be used to track progress and identify delays . Each tool suits different project needs and has its own advantages and disadvantages . Choosing the right tool makes planning more accurate , efficient and successful . Arrow Diagram The arrow diagram method is a project planning tool that represents tasks as arrows connected in sequence to show their order and dependencies . It helps identify the critical path . This is the longest sequence of dependent tasks that determines the project’s minimum completion time . This method is useful for visualising task relationships , spotting bottlenecks and showing the order of activities . Critical Path Analysis Critical path analysis ( CPA ), also known as the critical path method ( CPM ), is a project planning tool used to identify the critical path . This is the sequence of tasks that determines the shortest possible project duration . It highlights tasks that cannot be delayed without affecting the overall timeline . Critical path analysis helps prioritise resources , manage dependencies and minimise project delays . Flowcharts A flowchart is a diagram that represents a process or workflow using standard symbols and arrows to show the sequence of steps . It helps visualise decision points and actions and clearly highlights the flow of information or tasks . Flowcharts make complex processes easier to understand , communicate ideas to clients and troubleshoot potential problems . Gantt Charts A Gantt chart is a visual project management tool that displays tasks along a timeline , showing their start and end dates . It helps track task dependencies , overlaps and progress at a glance . Gantt charts are useful for coordinating work , meeting deadlines and ensuring all project stages are completed in order . PERT Charts A PERT ( program evaluation and review technique ) chart is a project planning tool that maps tasks , their dependencies and timelines in a network diagram . It uses three time estimates ( optimistic , most likely and pessimistic ) to calculate expected completion times for each task . PERT charts are especially useful for scheduling complex projects and identifying the critical path to meet deadlines . SWOT Analysis SWOT analysis is a strategic planning tool used to identify a project’s strengths , weaknesses , opportunities and threats . Strengths and weaknesses focus on internal factors ( controllable by the organisation ), while opportunities and threats look at external influences ( outside of the organisation's control ). It helps guide decision-making by highlighting advantages , weaknesses to address and potential risks or openings in the wider environment . Q uesto's Q uestions 3.2 - Project Planning Tools: 1. Define the term 'critical path ' and explain why it is calculated . [3 ] 2. Explain the S , W , O and T in SWOT analysis (not just what they stand for). [4 ] 3. Choose three project planning tools and describe the advantages and disadvantages of each . [ 12 ] Henry Gantt , an American engineer , created the Gantt chart in the 1910s . It has been used as a planning tool in many major projects , including building the Hoover Dam . D id Y ou K now? 3.1 - Planning Projects Topic List 4.1 - Gathering Client Requirements
- Python | 10c - Remove & Edit Lines | CSNewbs
Learn how to split, edit and removes lines using files in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. Python 10c - REMOVE & Edit LINES Splitting a File The split command is used to split up a line of a file into different parts . The character or string in brackets after the split command is the value that will denote each split . In the example below I have split the file at each comma . Remember that Python numbering starts at 0 so the first section is 0, not 1. 0 1 2 3 The program below splits each line of the file at each forward-slash ( / ). The printed statement is the employee's first name, surname and job position. 0 1 2 3 4 Practice Task 1 Create a file (new txt document in Notepad) called movies. Type in the movie name, main actor, genre (e.g. horror), year it was released and your rating out of 10. Print just the movie name and year it released. Example solution: Deleting Lines in a File Exact Line Name The code below shows how to remove a line from a file using the exact name of the line , which will only work for short or simple files . First open the file in read move to save each line in a variable I've named lines. Then ask the user to input the exact line they want to remove (e.g. 'plum' in my example). Then open the file in write mode and use a for loop to read each line and only write it back into the file if it isn't equal to the line the user entered - such as 'plum'. The line.rstrip() command is important as it removes any spaces or empty lines that may interfere with matching the line to the input. Deleting Lines in a File Word in the Line The code below shows how to remove a line from a file if a certain word appears in that line , although this could be dangerous with large files. In my example I have written apple which has also removed pineapple! The difference from the previous program is to change the for loop so that it checks if the inputted word appears in the line . If it does appear then nothing happens (except a print statement to acknowledge it's been found). If the word doesn't appear then that line can be safely rewritten to the file . Practice Task 2 Download the trees text file. Give the user a choice of removing a specific tree or a type of tree. If they choose a specific tree then remove the line if it is an exact match (e.g. Field Maple). If they choose to remove a type of tree remove all lines that contain the name of that tree (e.g. willow) Make sure you actually check the file to see if the lines have been removed correctly! Example solution: Download the trees file: Sorting a File Sorting a file into alphabetical (or numerical ) order is a simple process. Open the file in read mode and save the lines into a list . The sort c ommand will automatically order the list of lines. If necessary, in the brackets type reverse = True to sort the list in reverse. Practice Task 3 Expand on your tree program from the previous practice task. As well as SPECIFIC or TYPE, allow the user to enter SORT to sort the tree file either in alphabetical order or reverse alphabetical order. Check the text file to see if it has been sorted correctly. You may make this a separate program from task 2 if you wish. Example solution: Editing Lines in a File Overwriting data in a file is a tricky process. The program below uses the same Employees.txt file as above but allows the user to change the address of an employee . A temporary file is created to store the lines of the employee file, but the line with the changes is replaced specifically with the new address. I have explained each line of the program to the right: When I executed the program below I entered Thomas Wynne's details and changed his address. When I opened the employees file the address had been updated : 1: Importing os allows me to rename and remove files later in the program. 3: Opens the employee file in read mode . 5 - 8: Input lines allow the user to enter the first name, surname and the person's new address. 10: A found flag is set up and set to False . 12: The for loop cycles through each line in the file. 13: Each line is split into separate parts from each / . 15: An if statement checks if the first name and surname match an employee in the file. 16: A replacement line is created by putting the original line together but with the new address. 18: The found flag is changed to True because the employee first name and surname matched . 19: A temporary file is created and opened in write mode . 20: The seek command restarts the file at line 0 . 22: The for loop cycles through each line of the employee file from the beginning. If the first name and surname match it will write the new line to the file, otherwise it will rewrite the original line . 28 & 29: Both files are closed . 31 & 32: If the names didn't match , an appropriate message is printed. 34 - 37: If the address was changed, the original file is renamed and deleted and the temp file is renamed as the original file. Practice Task 4 Use the movie file you created for practice task 1. Ask the user to enter the name of a movie. Ask them to enter an updated rating out of 10. Update the file to change the rating to the new value. Example solution: ⬅ 10b - Read & Search Files Section 10 Practice Tasks ➡
- 4.3 - Green IT | Unit 2 | OCR Cambridge Technicals | CSNewbs
Learn about the purpose of Green IT, the benefits for an organisation following its practice and methods of use. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification for Unit 2 (Global Information). 4.3 - Green IT Exam Board: OCR Specification: 2016 - Unit 2 What is 'Green IT'? ‘Green IT ’ is to use computers and IT resources in an efficient and environmentally responsible way to reduce an organisation’s carbon footprint . To 'reduce carbon footprint ' means to decrease the amount of pollution (such as CO2 ) produced by an organisation and to engage in more eco-friendly practice. Examples of Green IT Practice Global Requirements of Green IT United Nations Climate Change conferences occur every year and are attended by leaders of each country in the United Nations. The conferences establish obligations for countries to work towards reducing their carbon footprints and emissions of greenhouse gases . Whilst Green IT is not specifically mentioned in these talks, IT is a hugely important sector with large annual emissions that need to be reduced to meet the climate change limitations, such as the Paris Agreement. In the UK, the Greening Government ICT Strategy (running between 2011 and 2015) was an annual report that investigated how IT use could become 'greener' within the government . Positive consequences of this strategy included: Using more cloud storage technology , enabling fewer individual storage devices to be purchased, reducing emissions . Using social media more widely to contact voters - saving money by posting fewer letters and leaflets. Increasing the use of teleconferencing and video calls - reducing the need for unnecessary travel to meetings and avoiding the generation of heavy pollution. Q uesto's Q uestions 4.3 - Green IT: 1. What is meant by the term 'Green IT '. [3 ] 2a. Explain four ways that an organisation can follow good green IT practice . [4 ] 2b. Describe two reasons why it is beneficial to a company of following Green IT . [4 ] 3a. Why are the United Nations Climate Change conferences important ? [2 ] 3b. Describe two ways that the UK government have used Green IT . [4 ] Turn off computers , monitors and other connected devices when not in use . Adjust power options to help minimise power consumption. Use cloud storage or virtualisation to reduce the number of physical devices being bought, powered and maintained. Repair older devices rather than throwing them away. Consider if it is necessary to print a document before doing so and print only what is required . Recycle ink cartridges and paper . Donate older equipment to charities or schools for reuse . Why use Green IT? It is in an organisation's best interests to use Green IT practices for the following reasons: To become more sustainable by reducing the company's carbon footprint and positively impacting the environment . Reducing energy costs (e.g. by turning equipment off when not in use) and saving money . Improving the public image of the organisation as people are increasingly environmentally conscious and will prefer to do business with a company that follows environmentally-friendly policies. 4.2 - Global Legislation Topic List 5.1 - Data Types & Sources
- 5.2 - Integrated Development Environment - OCR GCSE (J277 Spec) | CSNewbs
Learn about the tools of an integrated development environment (IDE) including the editor, error diagnostics and run-time environment. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). Exam Board: OCR Specification: J277 5.2: Integrated Development Environment Watch on YouTube : IDE Tools An IDE (Integrated Development Environment ) provides programmers with the following facilities (tools ) to help create programs : Editor The editor is software that allows a programmer to enter and edit source code . Editor features may include: Automatic formatting (e.g. automatic indentation). Automatic line numbering (this helps to identify exactly where an error has occurred). Automatic colour coding (e.g. Python IDLE turns loop commands orange and print commands purple). Statement completion (e.g. offering to auto-complete a command as the user is typing.) Error Diagnostics & Debugger Break point The programmer selects a specific line and the program displays the variable values at that point . The code can then be executed one line at a time to find exactly where the error occurs. This process is called single-stepping . Variable Watch / Watch Window cost Displays the current value of a selected variable . A variable can be watched line-by-line to see how the value changes . Trace Logs the values of variables and outputs of the program a s the code is executed line by line . Both tools are used to display information about an error when it occurs, such as the line it occurred on and the error type (e.g. syntax ). These tools may also suggest solutions to help the programmer to find and fix the error . Compilers & Interpreters Both tools convert the source code written by a programmer into machine code to be executed by the CPU. A compiler converts the entire source code into executable machine code at once . After compilation, the program can be run again without having to recompile each time. An interpreter converts source code into machine code line by line . An interpreter must reinterpret the code each time the program is required to run . See 5.1 for both types of translators. A runtime environment allows a program to run on a computer system. It checks for runtime errors and allows users to test the program . A runtime error occurs as the program is being executed , such as dividing a number by zero . A commonly used example is the Java Runtime Environment . This allows programmers to design a program on one platform ( using the programming language Java ) which allows the finished program to then be run on many others systems . A runtime environment enables the tools above such as a trace and breakpoint to be used. Run Time Environment Q uesto's Q uestions 5.2 - Integrated Development Environment: 1. Describe the purpose of each type of IDE tool : a. Editor b. Interpreter c. Compiler d. Error Diagnostics / Debugger e. Break point f. Variable Watch / Watch Window g. Trace h. Runtime Environment [ 2 each ] 5.1 - Languages & Translators Theory Topics
- Python | Section 10 Practice Tasks | CSNewbs
Test your understanding of working with files in Python, including reading, searching, writing and editing. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. Python - Section 10 Practice Tasks Task One Create a file in Python called DaysOfTheWeek.txt. Write the days of the week into the file in a single print line but put each day on a new line. Check the file to see if it has worked. Example solution: Task Two Create a file called Colours.txt. Use a for loop to ask the user to enter 8 different colours. Write each colour onto the same line, with a space between the colours. Close the file and open it again in read mode and print it. Example solution: Task Three Create a file named "Holiday.txt". Ask the user to enter the family name, destination and and number of passengers. Print each family's details on their own line. Bonus: Edit this program to add a search feature to look for the family name. Example solution: Task Four Use the holiday file from task three above. You are going to change the destination. Ask the user to enter a family name and then a new destination. Update the destination with the new value. Check the file to ensure the destination has been updated successfully. Use section 10c to help you with this task. Example solution: ⬅ 10c - Remove & Edit Lines 11 - Graphical User Interface ➡
- 1.1 - Programs & Applications | F160 | Cambridge Advanced National in Computing | AAQ
Learn about the differences and characteristics of programs and applications. 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.1 - Programs & Applications Watch on YouTube : Programs & Applications The terms 'program ' and 'application ' do not mean the same thing. A program performs individual operations while an application may use several programs together to create a functional tool for a user . For example, a program may calculate the total of a range of numbers . An example of an application is Microsoft Excel , which is spreadsheet software with a range of programs built in , including the ability to calculate totals , as well as many other functions . Programs and Applications Every topic in Unit F160 ( Fundamentals of Application Development ) comes with YouTube videos to help you learn . Some pages only have one video , while others have several . Programs Applications A program is a set of instructions that a computer can understand and execute to perform specific tasks . It is written in a programming language like Python or Java and instructs the computer how to perform individual operations . Programs can be simple (e.g. printing a message to the screen) or complex (e.g. managing a database or running a web server ). An application is a type of program designed to be user-friendly and help users complete specific tasks . Examples of applications include word processors (e.g. Microsoft Word), web browsers (e.g. Google Chrome) and mobile apps (e.g. Instagram). Applications are made up of one or more programs . Examples A program has a specific purpose , that is understood and executed by the computer . An example is a program that can sort data into alphabetical order . This may be used in an application like spreadsheet software . A video editing application may include several programs , each with a specific purpose , such as a program to import video , one to apply filters , another to edit audio and another to export the finished video . Characteristics Characteristics of a program: Programs are created using programming languages like Python or Java . They are translated into a format the computer understands and then run . Each program is designed to perform a specific function or set of functions . They may not have a user interface and may not require user interaction , such as an operating system's background processes . Programs may consist of smaller sub-programs that can be reused in different applications . Characteristics of an application: Applications are designed to meet user requirements . They are designed for specific tasks , such as editing photos or sending emails. Most have a user interface to provide a way for humans to interact with the application, e.g. menus and buttons . Applications may be designed to run on specific operating systems , such as an iPhone app designed for iOS. They may involve multiple programs working together . Devices that use Programs and Applications Every type of computer system will use programs and/or applications for different, specific purposes . Desktops and laptops run operating systems , software applications and utilities . Game consoles use applications for gaming , streaming and social features like group voice chats. Smart TVs use apps for streaming and browsing and programs for remote control . Smart speakers use programs to process voice commands , control smart home devices and play music based on user input . Smartphones and tablets use mobile apps for communication , games and productivity . AR (augmented reality ), VR (virtual reality ) and MR (mixed reality ) devices use programs to generate and manage 3D environments , track user movements and respond to inputs . Embedded systems like washing machines , smart fridges and cars use programs to manage their operations and interfaces . Q uesto's Q uestions 1.1 - Programs & Applications: 1. Explain the differences between a program and an application , using examples . [4 ] 2. Give 3 characteristics of a program and 3 features of an application . [6 ] 3. Briefly summarise how four different devices would use programs or applications . [4 ] As of 2025 , the Google Play Store has over 3.5 million apps and is close to reaching 150 billion downloads ! D id Y ou K now? Topic List 1.2 - Operating Systems
- Python | 1b - Commenting | CSNewbs
Learn how to comment in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python 1b - Commenting Writing Comments To annotate your work, you can write a comment using the # symbol. Comments are ignored when you run the program and they are not printed . #This is a comment! print ( "Welcome to Python!" ) #The code above prints a nice greeting = Welcome to Python! Programmers use comments to explain to other people (and themselves) what different sections of code do . With massive programs, comments are vital; otherwise, it would be too confusing, especially after returning from a few weeks or months on a different project. If you are creating a Python project for school (or A-Level Computer Science coursework), you will need comments to explain your code and prove you have written it yourself. Comments over Multiple Lines Have a lot to say in one comment? Use three apostrophes ( ”’ ) at the start and three more at the end of your comment like below: '''This is a comment that I have spread out over more than one line''' print ( "Hello! How are you?" ) Top Tip: Use multi-line comments when testing a program to ‘blank out’ sections that you know work fine and only focus on one part at a time. Commenting Task 1 (Day of the Week & Weather) On line 1 write a single-line comment ( use # ) to state that your program will print the day of the week. On line 2 print the current day of the week. On lines 3, 4 and 5 write a multi-line comment (use ''' ) about the weather today. Remember comments won't be printed so only the day of the week should be output. Example solution: Wednesday ⬅ 1a - Pri nting 1c - Crea ting Variables ➡
- 4.2 - Global Legislation | Unit 2 | OCR Cambridge Technicals | CSNewbs
Learn about legislation that covers a wider geographic area including the UNCRPD. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification for Unit 2 (Global Information). 4.2 - Global Legislation Exam Board: OCR Specification: 2016 - Unit 2 Data Protection Outside of the UK Personal data should not be transferred outside of the UK unless the country receiving the data has adequate data protection laws that match the Data Protection Act (2018) / GDPR (General Data Protection Regulation ). GDPR was introduced in all European Union (EU ) countries in 2018. This set of regulations ensure that personal data is protected and can be sent between EU countries. However, many other countries only have partially adequate data protection laws (such as the USA and Canada) whilst many nations have inadequate or no laws regarding data protection. Click the map button to visit CNIL's website and see exactly which countries have adequate, inadequate and no data protection laws. UNCRPD UNCRPD stands for United Nations Convention on the Rights of Persons with Disabilities . This is a United Nations human right that states disabled people should be able to 'access information systems' (article 9) and 'use digital means to express their opinion' (article 21). Methods of complying with this convention include: Personal data can be sent between European countries (such as the UK) and the United States because of a protection scheme which was known as the 'Safe Harbour ' scheme (between 2000 and 2015) and the 'EU-US Privacy Shield ' (between 2015 and 2020). This provided protection to European data in the US and required both companies engaged in data transaction to sign up to the scheme before personal data could be transferred. The companies must have been assessed as responsible for the security of the data. The scheme was stopped in July 2020 because the European Court of Justice argued it did not adequately protect the personal data of Europeans from government access. Using < alt> text on images so that text-to-speech software can describe the image aloud, for the visually impaired . The tag can be added to the HTML code of an image on a website and will be audibly spoken by specialist reading software. This image contains alt text that can't be seen by a typical viewer but will be read aloud by screen reading software. Accessibility settings . Websites could allow users to change the font size and style or change the background colour to make text easier to read . Wikipedia presents some articles to be listened to if the user is unable to read them. Example Text Example Text Example Text Example Text Q uesto's Q uestions 4.2 - Global Legislation: 1a. What is the problem with transferring data outside of the UK ? [2 ] 1b. Why can personal data be transferred between European countries ? [2 ] 2. Open the CNIL map (use the link on this page and click on a specific country to see its name) and state: Four countries in the EU Two countries with partially adequate protection Two countries with an authority and law (dark purple) Two countries with laws only (light purple) Four countries with no data protection laws [7 ] 3a. What is UNCRPD and why is it important ? [3 ] 3b. Describe what alt text is used for. [2 ] 3c. State three accessibility settings that could affect how easy text is to read . [3 ] EU-US Privacy Shield 4.1 - UK Legislation Topic List 4.3 - Green IT
- OCR CTech IT | Unit 1 | 2.4 - Operating Systems | CSNewbs
Learn about different types of operating systems and the various roles that they manage, including memory, security and processing. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification. 2.4: Operating Systems Exam Board: OCR Specification: 2016 - Unit 1 An operating system (OS) is software that manages the resources of a computer system . The operating system is loaded by the BIOS (Basic Input / Output System). Types of Operating System Single user operating systems are found on most desktop computers, laptops and tablets where only one person will use the device at a single time. Multi-user operating systems allow more than one user to access the processor simultaneously , such as a server that users, with correct permissions , can access remotely . However, one user should not be negatively impacted by another user on the same operating system and security must be managed carefully as data may be visible to other users . Single Processor operating systems have only a single processor (CPU), which is shared between users by dividing the CPU time into time-slices and allocating one of these to each user in turn. The time-slices are very short, giving each user the impression that their programs are running continuously. Multiple Processor operating systems have more than one processor (CPU). Users still have to share processors and it is a more complicated system but performance is improved as there are fewer users per processor. Some supercomputers have thousands of processors running in parallel. Operating systems can also be off-the-shelf , open-source or bespoke . See 2.1 . What are the roles of an Operating System? Manage Input / Output Devices Receives data from input devices (e.g. a keyboard). Sends data to output devices (e.g. a monitor) in the correct format . Manage Printing Checks the printer is free then uses spooling (storing data in a queue ) to print documents in order. Manage Backing (Secondary) Storage Ensures data is stored correctly and can be retrieved from secondary storage devices (e.g. hard drive / SSD ). Organises files in a hierarchical structure. Manage Memory (RAM) Ensures that programs / data do not corrupt each other and are stored in correct memory locations . Manage Processes Ensures different processes can utilise the CPU and do not interfere with each other or crash. On most OS the tasks appear to run simultaneously . Manage Security Allows users to create, manage and delete user accounts with different permissions. Allows users to logon and change passwords . User Interface The final function of an operating system is to provide a user interface . This includes: A folder and file system is displayed and manipulated allowing for copying , searching , sorting and deleting data. Icons are displayed to represent shortcuts to applications and files. Multiple windows can be opened at the same time and switched between. The interface can be customised , such as changing font sizes and the desktop background . System settings can be accessed such as network and hardware options . Q uesto's Q uestions 2.4 - Operating Systems: 1. Describe five different roles of the operating system. Include the importance of the operating system in performing each role. [ 5 ] 2. What is the difference between single user and multi-user operating systems? [2 ] 3. What is the difference between single processing and multi-processing operating systems? [2 ] 4. Using your knowledge from 2.1 Software Types, explain two advantages and one disadvantage to a company if they decided to use a closed source operating system. [6 ] 2.3 Utility Software Topic List 2.5 Communication Methods
- Python | 9b - Number Handling | CSNewbs
Learn how to handle numbers in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python 9b - Number Handling Rounding Numbers The round() command is used to round a value to a certain number of decimal places . Type your variable into the round command brackets, add a comma and state the number of decimal places to round to. Fixed Decimal Places (Currency) The round function will remove any trailing 0s , for example 30.1032 will become 30.1 even if you specified to round to 2 decimal places . Instead, you can use an f -string and write :.2f after a bracketed variable to use exactly 2 decimal places . The number can be changed from 2. books = int ( input ( "How many books would you like to buy? " )) total = books * 3.99 print ( f"The total is £ {total:.2f} - Thanks for your order!" ) How many books would you like to buy? 10 The total is £39.90 - Thanks for your order! How many books would you like to buy? 100 The total is £399.00 - Thanks for your order! Practice Task 1 Ask the user to enter any large number. Ask the user to enter another large number. Divide the two numbers and print the answer to 3 decimal places. Example solution: Using Numbers as Strings The following techniques all require the integer to be converted into a string first using the str command. Just like a string, you can shorten a variable to only display a certain length . Remember that Python starts at zero . You can select a specific digit in the same manner as when selecting characters in a string. If you want to use your variable as an integer again later you would need to convert it from a string to an integer using the int command. Again, reversing a number is the same as reversing a string. You can also use other string handling methods such as .startswith() or .endswith() Practice Task 2 Ask the user to enter a 10 digit number. Select the 2nd and 8th digits and add them together. Print the total. Example solution: ⬅ 9a - String Handling Section 9 Practice Tasks ➡
- App Inventor 2 | Munchin' Pizza | CSNewbs
Learn how to use App Inventor 2 to create simple programs. Try to complete task 3 on this page. Perfect for Key Stage 3 students to experiment with block coding, objects and properties. App Inventor Task 3 - Munchin' Pizza This page will teach you how to make a simple app that changes pictures when a button is pressed . You can make the app more complex by adding sounds or additional buttons. Step 1: Set up App Inventor 2 Open App Inventor 2 (use the button on the right) and create a new project. You will need to log in with a Google account. Download the picture images from the zipped folder on the App Inventor 2 Basics page here . Once you have downloaded the pizza pictures you will need to upload them. Find the Media tab on the right side of App Inventor and click 'Upload File...' You will need to upload each picture individually. In the Palette tab on the left side, drag two buttons into the middle screen so they look like this: In the Components tab on the right, click on Button1 and click the Rename button at the bottom to change it to Pizza . Then Rename Button2 to Munch . This will help us when we code later as it will be less confusing. Click on the second button (Munch) that you just dragged into the centre then look in the Properties tab on the right and scroll down to Text . Change 'Text for Munch' to something like 'Munch Pizza' . Now click on the first button in the centre (Pizza) and in the Properties tab, click on Image and select the first image. It should be the full slice of pizza. When you have set the image, you might notice it goes a bit crazy. Still in the Properties tab, change the Height and Width to 'Fill parent...' for both. This will make the image fit within the boundaries of the screen. Finally, change the Text for the Pizza button to be blank. Otherwise it will appear on top of the pizza and look odd. So far you should have a button disguised as a pizza and another button that tells you to munch that lovely cheesy deliciousness. If your program does not look like this, read the instructions above again carefully. Step 2: Code Click on the Blocks button in the top right to start adding code. In the Blocks tab on the left side click on Munch and drag the when Munch Click block into the centre. This block will execute any code inside of it whenever the munch button is clicked. In the Blocks tab on the left side click on Logic and drag an if then block and snap it inside the block you just dragged over. Click on the blue cog button and drag four else if blocks inside the if block at the bottom. The blocks at the top will automatically update when you drag the blocks under the if block underneath. Because we are using different images, we need to check which image is currently being displayed, so we know which picture to change to. Firstly we want to check if the first image is being displayed. Connect an = block from the Logic section. Then add a Pizza Image block from the Pizza section. Lastly grab a " " block from the Text section and write the name of your first image inside (e.g. pizza1.jpg) Don't forget the extension (.jpg). But what does this code actually mean? It is checking to see what the current pizza image is. And if it is pizza1.jpg then it is going to... ...change the picture to pizza2.jpg, as if someone has munched the pizza! Grab a set Pizza Image to block from Pizza and then snap another " " block from Text and add the pizza2.jpg text inside. Now that we have written the code to check the current picture and move it to the next one when pressed, we just need to copy this for the other four pizza pictures. Rather than select all the blocks again, right-clicking on the blocks and selecting 'Duplicate' will copy them. Copy each block and then change the values so that if pizza2.jpg is the current image, then it sets it to pizza3.jpg and so on. Make sure that pizza5.jpg sets the image to pizza1.jpg so that it goes round in a loop. Program 3 Complete! Step 3: Run The easiest way to run an app that you have created at home using App Inventor 2 is to download the free MIT AI2 Companion App on your smartphone from the Google Play Store . At the top of the App inventor program on your computer , click on Connect and AI Companion . This will generate a six-digit code you can type into your phone. If your school has the emulator installed, you can also use this to test your app. Extra Step: Challenges 1. Create your own images and upload them . You can easily create your own set of pictures and link them together. Why not try: Eating a different type of food (e.g. cookie or doughnut). A simple scene that changes from night to day. A simple character that changes appearance (like Pikachu powering up a thunder strike with each button press). 2. Add a sound effect whenever a button is pressed . In the video at the top of the page, you'll see I have a 'munch' sound whenever the button is pressed. You could record this sound yourself or use a sound effect site. Once you have got your sound file (it should be short and .mp3) you need to upload it, just like you uploaded your images. In the Designer layout click 'Upload file...' in the Media tab on the right. Then look in the Palette tab on the left side, open the Media section and drag a Sound block into the centre. It will appear underneath the phone screen in a section called 'non-visible components' which is fine. Now click on Properties on the right side and choose the sound file you just uploaded in the Source box. Click on the Blocks button in the top right to start adding the code! In the Blocks tab on the left side, click on Sound1 and drag the call Sound1 Play block directly underneath when Munch click . This will play the sound everytime the button is pressed. 3. Add more buttons . You could add a second clickable button which reverses the pattern and a third button that resets the order back to the first image. Adding new buttons is easy - drag them from the Palette tab in the Designer layout. Change the button text in the Properties tab and the name of the button in the Components tab. To add code, click on Blocks in the top right then you can duplicate the code for Munch by right-clicking and choosing Duplicate. Now just change the values to what you want. If you are making a reset button, you don't need an if then statement, just set the image to your first image when the button is clicked. Keep messing around with the program and have fun! KS3 Home Tasks 4, 5 & 6









