top of page

Search CSNewbs

290 results found with an empty search

  • OCR CTech IT | Unit 1 | 5.1 - Ethical Issues | CSNewbs

    Learn about ethical issues of IT including whistleblowing, discrimination, online safety and bias. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification. 5.1 - Ethical Issues Exam Board: OCR Specification: 2016 - Unit 1 What are ethics? Ethics refers to what is right and wrong . The following issues are often linked to or backed up by legislation. Whistle Blowing Definition: When a member of staff reveals that the organisation they work for are engaging in unlawful practices . This could include breaking privacy laws , threatening staff or environmental damage . In the UK , whistleblowers are protected by the Public Interest Disclosures Act (1988) . Under this law, whistleblowers are protected from being fired or being victimised (e.g. ignored for promotion ) as a result of their whistleblowing. Large organisations should consider establishing a whistleblowing policy that would outline how employees can raise concerns , who they should speak to and the support available to concerned staff. A famous whistleblower is Edward Snowden , who revealed in 2013 that many governments, including the USA and the UK, were spying on their civilians with widespread undocumented surveillance. Should Martin reveal that his company is dumping old computers into a lake or just stay quiet? Graham feels that, because of his disability, he is being ignored for a promotion that he deserves. Discrimination Definition: When an employee is treated unfairly because of a personal or physical characteristic over which they have no control . The Equality Act (2010) ensures equal treatment for all people irrespective of: race sexuality gender disability marital status (and many more) Examples of discrimination include offensive talk, harassment, unequal pay and being ignored for promotion. Use of Information Definition: Laws such as GDPR (General Data Protection Regulation ) and specifically the Data Protection Act (2018) ensure that organisations must responsibly process personal data. Organisations have a legal obligation to keep their employee and customer personal data secure and out of reach from unauthorised viewers. Considerations should be made about how the information is ethically collected , stored and processed . DataDyne backs up customer information on cloud storage - what if this data is compromised ? As part of quality assurance, Selside Bank double check performance reviews before submission. Codes of Practice Definition: A set of rules which explains how people working in certain professions are required to behave . Organisations may have a code of practice for: Confidentiality (rules on what data can and cannot be shared with others), Quality assurance (ensuring high quality is maintained for all products/services), Behaviour (setting out how employees are expected to behave at work and in communication with each other and customers), Equality and discrimination (being understanding and providing fair access to all employees). Employees must agree to the codes of practice so they are clear on their expectations of what is and isn't acceptable at work. The organisation can then discipline employees that broke the codes of practice they formerly agreed to. Online Safety Definition: Often companies will provide an induction (training ) to new employees about the organisation’s code of practice for using the internet whilst at work . If an individual does not behave safely online or breaks the organisation's codes of practice (by gambling at work for example) then they may be punished (e.g. fined or fired). Employees can ensure that they are safe online by using secure passwords that are regularly updated and preventing web browsers from remembering login details . Miriam changes her password each month to minimise the chance of hackers accessing her account. The CEO of Honey Media apologies in public after biased information led to a lawsuit and loss of reputation. Bias Definition: This is technically correct, but slanted , information that presents a one-sided view . For example, end-of year financial data that focuses on profits and ignores significant losses. Poor quality information may lead to an organisation being misinformed and not sufficiently responding to their customers' needs - for example if a survey was only completed by a small number of people it could generate biased results. As a result of poor quality information, organisations may suffer from damage to their reputation due to negative feedback and reviews from customers, possibly posted online. A lack of trust can occur if customers feel neglected because of decisions made using biased information of a poor quality, therefore reputational damage may lead to loss of customers . Q uesto's Q uestions 5.1 - Ethical Issues: 1. Describe what whistleblowing is and give 3 examples . [4 ] 2. Describe what discrimination is and give 4 examples . [5 ] 3. Which law relates to the use of information ? [1 ] 4a. Describe 2 things that may be included in an organisation's codes of practice . [4 ] 4b. Explain why employees must agree to their company's codes of practice [4 ]. 5. Describe 2 things an employee should do to stay safe online . [2 ] 6a. What is biased information ? [2 ] 6b. Describe 3 possible effects to a company if they use biased information . [6 ] 4.6 & 4.7 - Bodies & Certification Topic List 5.2 - Operational Issues

  • Unit F160 - Fundamentals of Application Development - Cambridge Advanced National in Computing | CSNewbs

    Navigate between all Unit F160 (Fundamentals of Application Development) topics in the OCR Cambridge Advanced National in Computing (AAQ) specification. Qualification: Cambridge Advanced National in Computing (AAQ) Unit: F160: Fundamentals of Application Development Certificate: Computing: Application Development (H029 / H129) Unit F160: Fundamentals of Application Development These pages are based on content from the OCR Cambridge Advanced National in Computing (AAQ) specification . Unit F160 YouTube Playlist Topic 1: Types of Software 1.1 - Programs and Applications 1.2 - Operating Systems 1.3.1 - Application Types 1.3.2 - Application Software Categories 1.3.3 - Application Software Types Topic 2: Software Development Models 2.1 - Software Development Models 2.2 - Development Phases Topic 3: Planning Development Projects 3.1 - Planning Projects 3.2 - Project Planning Tools Topic 4: Application Design Scoping 4.1 - Gathering Client Requirements 4.2 - Client Requirement Specifications 4.3 - Decomposition Methods Topic 5: Human-Computer Interface 5.1.1 - Types of Human-Computer Interaction (HCI) 5.1.2 - Types of Devices 5.2 - HCI Visual Design Considerations 5.3 - HCI Design Documents & Diagrams Topic 6: Job Roles & Skills 6.1 - Job Roles 6.2 - Communication Skills

  • 5.1 - Languages & Translators - OCR GCSE (J277 Spec) | CSNewbs

    Learn about the two types of language levels - high level languages and low level languages , as well as the use of interpreters and compilers. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). 5.1: Languages & Translators Exam Board: OCR Specification: J277 Watch on YouTube : High-Level & Low-Level Languages Translators (Compiler & Interpreter) There are two types of programming languages used within computer systems: High-Level Languages Why do programmers use high-level languages? H igh-level programming languages use code written in a way that is similar to a natural human language , such as English, making it easier to understand and use the language. Using high-level languages leads to fewer errors and allows for more powerful and complex commands compared to low-level languages. However, a high-level language must be translated into machine code (binary) before it can be run, as high-level languages cannot be executed directly by the CPU . Popular high-level languages: PYT HON C++ Ja v a Visual Basic Low-Level Languages Low-level languages do not closely resemble a natural human language , making it harder for humans to understand and write in. Low-level languages are used when a program must be executed quickly or when programmers need to write code that interacts directly with the hardware , such as device drivers. There are two types of low-level language : Machine Code This is the pure binary code that computers can directly process and execute . It is extremely tedious and difficult for humans to understand and write machine code. However, machine code can be used when a programmer needs to perform a very specific command that can't be done in a high-level language. Machine code will be executed faster than high-level programs because it is already in a format the CPU can execute and does not need to be translated . 0010 1011 0101 0101 0110 0111 0101 0001 0101 0101 0101 0100 1010 1010 1010 1010 1111 1110 0010 1001 0100 1001 0010 0111 0111 0101 0011 1010 1000 0101 0110 0111 0000 1010 1010 0011 1101 1001 0010 1101 0010 0100 1001 0011 1010 1001 0101 0101 0010 0101 0111 0101 0101 1000 1011 0111 Assembly Language Assembly language uses specialised command mnemonics to perform actions . See the Assembly Language section in the programming tab for a list of mnemonics such as INP , OUT and HLT . Assembly language is preferred by many programmers over machine code because it is easier to understand and spot errors . It is faster to execute than high-level languages and, like machine code, can be used to directly control the CPU . INP STA Number1 OUT HLT Number1 DAT Translators A translator changes (translates) a program written in one language into another language (usually machine code ). There are two main types of translator : Interpreter An interpreter converts high-level language one line at a time into machine code and executes it. Compiler A compiler converts high-level language into machine code for execution at a later time. The entire program is converted at once . PYT HON PYT HON 0010 1011 0101 0101 0110 0111 0101 0001 0101 0101 0010 1011 0101 0101 0110 0111 0101 0001 0101 0101 Interpreters vs Compilers Interpreter Compiler Execution Method: An interpreter translates source code (high level code) into machine code one line at a time . Execution Speed: An interpreter is slower than a compiler because the code must be reinterpreted each time the program is run. Complexity: Interpreters are smaller, simpler programs . Error Reporting: In error reporting, the interpreter would encounter the errors and report it to the user immediately and stops the program from running. Repetition: Interpreted programs can be edited and run without translating the whole program . Interpreters must reinterpret the program every time it is run. Execution Method: A compiler translates all the source code (high level code) into machine code in one go . A compiler produces an executable file that will run on other machines without the compiler needing to be installed. Execution Speed: Compilers can produce much more efficient code than interpreters making the compiled programs run faster . Complexity: Compilers tend to be large complex programs . Error Reporting: The compiler would analyse the entire program , taking note of where errors have occurred and record them in an error file . Repetition: Compilation requires analysis and the generation of the code only once , whereas interpreters must re-interpret each time. However, compiled programs have to be re-compiled after any changes have been made. x1 ∞ x1 Q uesto's Q uestions 5.1 - Languages & Translators: 1a. Describe three reasons why programmers use high-level languages . [ 3 ] 1b. Explain one limitation of using high-level languages . [2 ] 2a. Describe a key difference between low-level languages and high-level languages . [ 2 ] 2b. Describe when a low-level language would be used instead of a high-level language . [2 ] 2c. Describe an advantage and a disadvantage of writing directly in machine code . [2 ] 2d. Describe what assembly language is. Give one benefit to using assembly language instead of machine code and one benefit to using it instead of a high-level language . [3 ] 3. Compare high-level and low-level languages by stating which is: a. Easier to understand [ 1 ] b. Requiring translation [ 1 ] c. Quicker to execute [ 1 ] 4. Compare interpreters and compilers for each of the following features : a. Execution Method b. Execution Speed c. Complexity d. Error Reporting e. Repetition [ 10 total ] 4.1 - Boolean Logic Theory Topics 5.2 - IDE

  • Python | 2a - Inputting Text | CSNewbs

    Learn how to input strings (text) in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python 2a - Inputting Text Inputting Text (Strings) in Python A string is a collection of characters (letters, numbers and punctuation) such as: “Wednesday” , “Toy Story 4” or “Boeing 747” . Use the input command to ask a question and let a user input data , which is automatically stored as a string . Variable to save the answer into. Give it a suitable name based on the input. name = input ( "What is your name? " ) = What is your name? Paulina Type your answer directly into the editor and press the Enter key. Statement that is printed to the screen. Leave a space to make the output look clearer. Once an input has been saved into a variable, it can be used for other purposes, such as printing it within a sentence : name = input ( "What is your name? " ) print ( "It is nice to meet you" , name) = What is your name? Jake the Dog It is nice to meet you Jake the Dog Always choose an appropriate variable name when using inputs. colour = input ( "What is your favourite colour? " ) print ( "Your favourite colour is " + colour + "? Mine is yellow." ) = What is your favourite colour? blue Your favourite colour is blue? Mine is yellow. Inputting Text Task 1 ( Holiday) Write an input line to ask the user where they last went on holiday . Write a print line that uses the holiday variable (their answer). Example solution: Where did you last go on holiday? Scotland I hope you had a nice time in Scotland Inputting Text Task 2 ( New Neighbour) Write an input line to ask the user for a title (e.g. Mr, Mrs, Dr). Write another input line for an object . Write a print line that uses both input variables (title and object ). Example solutions: Enter a title: Dr Enter an object: Fridge I think my new neighbour is Dr Fridge Enter a title: Mrs Enter an object: Armchair I think my new neighbour is Mrs Armchair Using a Variable Within an Input To use a variable you have previously assigned a value t o within the input statement you must use + (commas will not work). drink = input ( "What would you like to drink? " ) option = input ( "What would you like with your " + drink + "? " ) print ( "Getting your" , drink , "and" , option , "now...." ) = What would you like to drink? tea What would you like with your tea? biscuits Getting your tea and biscuits now... What would you like to drink? apple juice What would you like with your apple juice? cake Getting your apple juice and cake now... Inputting Text Task 3 ( Name & Game) Ask the user what their name is. Ask the user what their favourite game is. Use their name in the input statement for their game. Print a response with their name and the game they entered. Example solutions: What is your name? Rory Hi Rory, what's your favourite game? Minecraft Rory likes Minecraft? That's nice to know. What is your name? Kayleigh Hi Kayleigh, what's your favourite game? Stardew Valley Kayleigh likes Stardew Valley? That's nice to know. ⬅ Section 1 Practice Ta sks 2b - I nputting Numbers ➡

  • 11 Graphical User Interface | CSNewbs

    Learn how to create and use a simple graphical user interface (GUI) in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. Python 11 - GUI Graphical User Interface In Python, you don’t have just to use a text display; you can create a GUI (Graphical User Interface ) to make programs that look professional. This page demonstrates the basic features of Python’s built-in GUI named tkinter . You can add images, labels, buttons and data entry boxes to develop interactive programs . Hyperlinked sections covered on this page: Setup: Title, Size & Background Creating Elements: Labels, Entry Boxes, Buttons, Images, Message Boxes Displaying Elements: Pack, Place, Grid Inputs & Outputs GUI Tasks Setup Setup: Title, Size & Background Firstly, import the tkinter command and set tkinter.Tk() to a variable such as window . GUI code can be quite complicated with multiple elements so it is sensible to use a comment for each section. Setting the title , size and background colour of your window is optional but can be easily set up at the start of your code. The .geometry() command sets the size of the window. The first number is the width , and the second number is the height . The .configure() command can be used to set the background colour . For a full list of compatible colours, check here . import tkinter #Setting up the Window window = tkinter.Tk() window.title( "Graphical User Interface" ) window.geometry( "400x400" ) window.configure(background = "lightblue" ) import tkinter #Setting up the Window window = tkinter.Tk() window.title( "Example Number Two" ) window.geometry( "300x400" ) window.configure(background = "darkorchid3" ) Creating Elements Creating Elements: Labels, Entry Boxes, Buttons, Radio Buttons, Images, Message Boxes Labels label1 = tkinter.Label(window, text = "Hello there" ) label1 = tkinter.Label(window, text = "Hello there" , fg = "black" , bg = "lightblue" , font = ( "Arial" , 12)) Simple label with default formatting: Label with custom formatting: No elements will appear in your window until you write code to put them there. See the 'Displaying Elements' section further down. Entry (Text) Boxes Simple entry box with default formatting: entry1 = tkinter.Entry(window ) Entry boxes will appear blank , the 'Example Text' shown in the images has been typed in. Entry box with custom formatting: entry1 = tkinter.Entry(window, fg = "blue" , bg = "gray90" , width = 12, font = ( "Arial" ,12)) Buttons The command property of a button is a subroutine that will be called when the button is pressed . The subroutine must be written above the button creation code. def ButtonPress (): #Code here runs when the button is pressed button1 = tkinter.Button(window, text = "Click Me" , fg = "black" , bg = "gold2" , command = ButtonPress) Radio Buttons The Radiobutton element is a multiple-choice option button . A variable needs to be created to track which option has been selected, in this example it is ‘choice ’. Each radio button needs to be linked to the variable and given a unique value (e.g. 0, 1, 2). The radio button with the the value of 0 will be automatically selected when the window opens . Although not shown below, the .set() command can also be used to select a specific radio button , e.g. choice.set(2) . choice = tkinter.IntVar() radio1 = tkinter.Radiobutton(window, text = "Breakfast" , variable = choice, value = 0) radio2 = tkinter.Radiobutton(window, text = "Lunch" , variable = choice, value = 1) radio3 = tkinter.Radiobutton(window, text = "Dinner" , variable = choice, value = 2) Message Boxes You need to import messagebox from tkinter before you can use message boxes . You only need to do this once in your program and it sensible to have it at the very start after you import tkinter (and any other libraries). from tkinter import messagebox tkinter.messagebox.showinfo( "Information" , "Welcome to the program!" ) tkinter.messagebox.showerror( "Error" , "There is a problem with the program." ) if (tkinter.messagebox.askyesno( "Warning" , "Have you understood the instructions?" )) == True : tkinter.messagebox.showinfo( "Warning" , "Thank you for understanding." ) else : tkinter.messagebox.showinfo( "Warning" , "Please read the instructions again." ) Yes / No Message Box Clicking Yes (True ) Clicking No (False ) Images Tkinter supports the image file types .png and .gif . The image file must be saved in the same folder that the .py file is. Resize the image in separate image editing software such as Paint to a specific size . Tkinter does not support all image file types, such as .jpg. Use an application like Microsoft Paint to save an image with a different extension like .png. photo1 = tkinter.PhotoImage(file = "hamster.png" ) photoLabel1 = tkinter.Label(window, image = photo1) An image can be turned into a clickable button rather than a label. def ButtonPress (): #Code here runs when the button is pressed photo1 = tkinter.PhotoImage(file = "hamster.png" ) button1 = tkinter.Button(window, image = photo1, command = ButtonPress) photo1 = tkinter.PhotoImage(file = "hamster.png" ) window.iconphoto( True , photo1) The icon of the window can be changed to an image . Displaying Elements: Pack, Place and Grid Pack .pack() puts the element in the centre of the window, with the next packed element immediately below. window.mainloop() should always be your last line of code in every program, after you have packed, placed or gridded your elements. Displaying Elements labelAdd.pack() buttonAdd.pack() labelMinus.pack() buttonMinus.pack() window.mainloop() Place The .place() command allows an element to be placed in specific coordinates , using x (horizontal ) and y (vertical ) axes. labelAdd.place(x = 25, y = 15) buttonAdd.place(x = 12, y = 35) labelMinus.place(x = 90, y = 15) buttonMinus.place(x = 83, y = 35) window.mainloop() Grid The .grid() command is used to create a grid system to set the row and column . Remember Python starts counting at 0 . You can use padx and pady to add extra space (x is horizontal , y is vertical ). labelAdd.grid(row = 0, column = 0, padx = 10, pady = 5) buttonAdd.grid(row = 1, column = 0, padx = 10) labelMinus.grid(row = 0, column = 1, padx = 10, pady = 5) buttonMinus.grid(row = 1, column = 1, padx = 10) window.mainloop() Inputs & Outputs Inputs and Outputs .config to Change an Element .config() overwrites the property of an element. It can be used with elements such as labels and buttons to change how they appear. label1.config(text = "Warning!" ) The example below (not showing setup and packing) adds 1 to a total variable when the button is pressed . Config is used in two ways: to display the updated total and to change the background of the label to green. def AddOne (): global total total = total + 1 labelTotal.config(text = total, bg = "green" ) total = 0 buttonAdd = tkinter.Button(window, text = "Add" , command = AddOne) Below is a similar program in full that increases or decreases and displays a total when the buttons are pressed . #Setup import tkinter window = tkinter.Tk() total = 0 #Button Presses def AddOne (): global total total = total + 1 labelTotal.config(text = total) def MinusOne (): global total total = total - 1 labelTotal.config(text = total) #Create Elements labelTotal = tkinter.Label(window, text = total, font = ( "Arial" ,14)) buttonAdd = tkinter.Button(window, text = "+" , width = 6, bg = "green" , command = AddOne) buttonMinus = tkinter.Button(window, text = "-" , width = 6, bg = "red" , command = MinusOne) #Display Elements buttonAdd.pack() buttonMinus.pack() labelTotal.pack() window.mainloop() .get to Input a Value .get() returns the value of an element such as an entry box , label or the choice variable if using radio buttons . The value of the element should be stored in a variable so it can be used elsewhere, for example: name = entryName.get() number = int (entryNumber.get()) Use int when getting a value that is an integer : The full program example below checks that the values typed into the username and password entry boxes are correct . Error Messages #Setup import tkinter from tkinter import messagebox window = tkinter.Tk() window.title( "Login" ) #Button Presses def CheckDetails (): username = entryUsername.get() password = entryPassword.get() if username == "Bob Bobson" and password == "cabbage123" : tkinter.messagebox.showinfo( "Success" , "Welcome " + username) else : tkinter.messagebox.showerror( "Invalid ", "Those details are incorrect." ) #Create Elements labelUsername = tkinter.Label(window, text = "Username:" ) labelPassword = tkinter.Label(window, text = "Password" ) entryUsername = tkinter.Entry(window) entryPassword = tkinter.Entry(window) buttonLogin = tkinter.Button(window, text = "Login" , command = CheckDetails) #Display Elements labelUsername.grid(row = 0, column = 0) entryUsername.grid(row = 0, column = 1) labelPassword.grid(row = 1, column = 0) entryPassword.grid(row = 1, column = 1) buttonLogin.grid(row = 2, column = 0) window.mainloop() .bind for Key Presses (& Close Window) .get() will run a specific function when a certain key is pressed. The name of the key must be surrounded by < > brackets and speechmarks . Any associated subroutine of a key bind will need a parameter : event has been chosen and set to None . The code below closes the window using the .destroy() command when the Esc key is pressed. def Close (event = None ): window.destroy() window.bind( "" , Close) The code below will activate the button (and display a message box) by clicking on it but also by pressing the Enter ( Return ) key . def ButtonPress (event = None ): tkinter.messagebox.showinfo( "Success" , "The button was activated" ) button1 = tkinter.Button(window, text = "Press Me" , command = ButtonPress) window.bind( "" , ButtonPress) GUI Tasks GUI Programs to Make Making a program using a GUI can be overwhelming and you must decompose the problem - take it step by step : Import tkinter and create the window (set the title, size and background colour). Create the elements you will need such as labels , buttons and entry boxes . Put the components in the window using pack , place or grid . Write the subroutines for any button presses . These are written at the top of the program after the window setup. Consider your variables - do any need to be set at the start ? Have you made them global if they’re needed within a subroutine ? Put window.mainloop() as the final line of code, only have it once. Use #comments in your code to break up the different sections, the key four sections are shown below. #Setup #Button Presses #Create Elements #Display Elements GUI Task 1 (Random Number Generator ) Generate a random number between 1 and 100 when the button is pressed and display it in a label. Extension idea: Use entry boxes to allow the user to manually input the minimum and maximum value. Example solution: GUI Task 2 (Currency Exchange ) Enter a decimal value and convert it from British pounds to American dollars. You can search for the current exchange rate. Extension idea: Show the conversion rate for other currencies such as Euros and Japanese Yen. Example solution: GUI Task 3 (Random Quote Generator ) Create a list of quotes and use the choice command from the random library to select one to be displayed in a label when the button is clicked. Extension idea: Have a separate text box and button to add more quotes to the list. Example solution: GUI Task 4 (Colour Changer ) When the button is clicked change the background colour of the button with .config to the RGB colour code in the entry box. This should be # followed by 6 hexadecimal values (0-9, A-F). Extension idea: Have an error pop up in a message box if the colour code is incorrect - it must be exactly 7 characters long and start with a hashtag. Example solutions: GUI Task 5 (Class Captain Votes ) Use radio buttons to vote for different candidates in a class vote. Use an if statement when the button is pressed to check which radio button is selected using .get() and the variable you've assigned to the radio buttons ('choice' if you've followed the code in the radio buttons section on this page). Use .config to overwrite a label's value. Remember any variables you want to use in subroutines must be globalised. Extension idea: Stop the count after a certain number - e.g. 30 votes recorded. Example solution: ⬅ Section 10 Practice Tasks 12 - Error Handling ➡

  • Greenfoot Guide #3 | Random Movement | csnewbs

    Learn how to edit code in Greenfoot to make objects move randomly across the screen. This can be used on 'enemy' objects. Part 3 of the Greenfoot Tutorial for the Eduqas / WJEC GCSE 2016 specification. 3. Random Movement 1. Code for Random Movement Greenfoot Tutorial Watch on YouTube: Right-click on your enemy class on the main screen and select ' Open editor '. The enemy character should always be moving, so start with move(1); Next we will use an if statement to start the random movement. This code generates 10 random numbers and if it is less than 1 then it will run the proceeding code. If we don't do this, the character will turn too much or too little . This code generates a random angle between 0 and 90. The - 45 part is necessary otherwise the character will always move to the right . See the diagram below for an explanation: 2. Bounce at World Edge You may have noticed that the enemy objects can get 'stuck' in the corners or when they hit the edge of the world. In the act() method, below the random movement code , add the code in the red box . This code checks to see if the object is at the edge , and turns it around ( 180 degrees ) if it is. 3. Compile and Run Click the Compile button at the top of the code editor . Then you can go back to the main Greenfoot window and click Run to test if your enemy objects move . Click on me if you've got an error that you're stuck with. < Part 2 - Movement with the Arrow Keys Part 4 - Remove Objects >

  • OCR CTech IT | Unit 1 | 2.6 - Software Troubleshooting | CSNewbs

    Learn about software errors and troubleshooting methods of solving them. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification. 2.6 - Software Troubleshooting Exam Board: OCR Specification: 2016 - Unit 1 A software error occurs when a program or process stops working as expected. Software errors usually occur when programs are badly written or if a user inputs unexpected data . Common Faults System Freeze The computer freezes and pressing keys or moving the mouse gives no response . Commonly caused by having too many applications running simultaneously or a virus using too much memory . Unexpected Reboot To try and fix errors, a computer might get stuck in an endless loop of booting and rebooting . Other systems may frequently restart without warning . Stop Error This occurs after a fatal system error when the operating system stops , usually because of a driver software issue . Commonly known as the 'blue screen of death ' on Windows-based systems. Update Error While designed to fix errors, updates can sometimes bring more problems if they interfere with the current software . Troubleshooting Tools for Software Errors Event Viewer (Logs) If a software error does occur, then the same characteristics as a hardware error should be logged , such as the time and date of the error , the user logged in , and the device's problem history . Memory Dump Copies and displays the contents of RAM at the time of a crash to help a technician discover what happened . Baselines Before After A comparison of what the system is like after a crash compared to a fixed point in time beforehand. The baseline can be used to see differences which may have caused the computer to fail . Anti-Virus Checks if malware is running on a device, using up resources and slowing the system down. It could then be quarantined and deleted by the anti-virus. Installable tools can also be downloaded to investigate the system and find the cause of the problem . They may help detect corrupted files , uncover deleted files , and resolve other general hardware or software issues . Q uesto's Q uestions 2.6 - Software Troubleshooting: 1. Describe each of the four common types of software error : a. System Freeze b. Stop Error c. Unexpected Reboot d. Update Error [2 each ] 2. Describe each type of troubleshooting tool and explain how it can be used to discover and fix software errors. a. Event Viewer b. Memory Dump c. Baselines d. Antivirus Software e. Installable Tools [ 2 each ] 2.5 Communication Methods Topic List 2.7 - Protocols

  • 5.1 - Data Structures - Eduqas GCSE (2020 Spec) | CSNewbs

    Learn about different data structures such as arrays, lists and records. Also, the difference between static and dynamic data structures and how to design files. Based on the 2020 Eduqas (WJEC) GCSE specification. 5.1: Data Structures & File Design Exam Board: Eduqas / WJEC Specification: 2020 + What is a Data Structure? A data structure is a way of efficiently organising data . There are two general forms of data structures: Static Data Structures The size of a static data structure cannot change e.g. if a data structure has 20 elements, no additional elements can be added or removed. The values of the data elements can be changed, but memory size is fixed when allocated at compile time. Because a static data structure holds a certain number of data elements they are easier to program because the size of the structure and the number of elements never change. An array is an example of a static data structure. Examples: A static data structure could be an array of teams in the Premier League. The data elements will change each year when teams are relegated and promoted but there will always be 20 teams. Dynamic Data Structures The size of a dynamic data structure can change as the program is being run , it is possible to add or remove data elements. Dynamic data structures make the most efficient use of memory but are more difficult to program , as you have to check the size of the data structure and the location of the data items each time you use the data. A list is an example of a dynamic data structure. A dynamic data structure could be a list of all teams in the Premier League that won their last match. Data elements (teams) will be added or removed across the season. Types of Data Structures List A list is a dynamic data structure that has the data elements stored in the order they were originally added to memory . Every data structure starts at 0, not 1 . Lists store data elements in the order they were added, so the first doctor is 0 and the most recent doctor is 12. An example list of the main Doctor Who actors Array An array is a static data structure that can hold a fixed number of data elements . Each data element must be of the same data type i.e. real, integer, string. The elements in an array are identified by a number that indicates their position in the array. This number is known as the index. The first element in an array always has an index of 0 . You should know how to write pseudo code that manipulates arrays to traverse, add, remove and search data. The following steps uses Python as an example. Traversing an Array To traverse (' move through ') an array a for loop can be used to display each data element in order. 'Inserting' a value In an array the size is fixed so you cannot insert new values, but you can change the value of elements that already exist. Overwriting the fourth element (Daphne) with a new value (Laura) will change it from Daphne to Laura. Example code for traversing: Example code for inserting: Output: Output: 'Deleting' a value In an array the size is fixed so you cannot delete values, but you can overwrite them as blank . Overwriting the second element (Shaggy) with a blank space makes it appear deleted. Example code for deleting: Output: Searching an Array For large arrays a for loop is needed to search through each element for a specific value . This example checks each name to see if it is equal to Velma. Example code for searching: Output: Two-Dimensional Array Often the data we want to process comes in the form of a table . The data in a two dimensional array must still all be of the same data type , but can have multiple rows and columns . The two-dimensional array to the right shows the characters from Scooby Doo along with their associated colour and their species. Each value in the array is represented by an index still, but now the index has two values . For example [3] [0] is 'Daphne'. We measure row first , then column . Searching a two-dimensional array: To print a specific data element you can just use the index number like Daphne above. To search for a specific value you will need two for loops, one for the row and another for the values of each row. The example to the right is looking for the value of 'Velma' and when it is round it prints the associated data from the whole row. Example code for printing: Output: Example code for searching: Output: Records Unlike arrays, records can store data of different data types . Each record is made up of information about one person or thing. Each piece of information in the record is called a field (each row name). Records should have a key field - this is unique data that identifies each record . For example Student ID is a good key field for a record on students as no two students can have the same Student ID. Data files are made up of records with the same structure. It would be most efficient for the fields in a record to be stored next to each other so that the data can be read into the record data structure in memory for processing by the CPU. In an exam you may be asked to state and design a data structure for a given scenario. If the data structure can hold values of the same data type you should draw an array , usually a 2D array for multiple rows and columns. Remember that a record is required to store values of different data types . Example questions: "A video gamer has recorded their three lap times in four Mario Kart courses." " State and design the most suitable data structure for this data." A two-dimensional array is most suitable because only one data type ( real ) is stored. "A vet surgery stores data on all dogs and cats including the animal's name, age (in years), weight (in kg) and whether or not it has been vaccinated." " State and design the most suitable data structure for this data for four animals ." A record is most suitable because the data structure requires different data types . Q uesto's Q uestions 5.1 - Data Structures: 1. Give two differences between static and dynamic data structures . [ 4 ] 2. Describe the differences between a list , array and record . [ 3 ] 3. A one-dimensional array looks like this: TigerBreeds("Sumatran","Indian","Malayan,"Amur") Write the code to: a. Print the element with the index of 3. [ 2 ] b. Change Indian to South China. [ 2 ] c. Remove the Amur element. [ 2 ] d. Search through the array for 'Malayan'. [ 2 ] 4. State and design the most suitable data structure for these scenarios: a. For each book in a bookshop, the staff need to record the title, author, number of pages and whether or not it is a signed copy. Include data for three books. [ 3 ] b. Four dieters are recording how many kilograms they have lost each month for 5 months. [ 4 ] 5. Design a file that stores the first initial, surname, age and hair colour of each member of a family. [ 8 ] Designing Data Structures Data is stored in files when it needs to be kept after the program has stopped running . To learn how to write code for file handling (e.g. opening, writing to, reading from and closing files) in Python click here . Designing a file requires more than just the field name (e.g. Name) and data values (e.g. Rebecca). The data type (e.g. string) and any validation checks (e.g. format check) should also be considered. Below is an example file design for a bakery. Designing Files 4.8 Compression Theory Topics 6.1 - Operating Systems

  • Python | 8c - Dictionaries | CSNewbs

    Learn how to create and use dictionaries in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python 8C - Dictionaries Creating a Dictionary Dictionaries are used in Python to link items of data together . The example on this page uses a footballer dictionary which links a player with a team they played for. To define a dictionary, use curly brackets { } and separate linked data with a colon . A dictionary can be written on one line but the method below makes it easier to read: Printing Data from a Dictionary The first part of the linked data in a dictionary is called the key (e.g. each footballer in my example above). The second part of the linked data in a dictionary is called the value (e.g. each team). Example: key : value "Harry Kane" : "Tottenham Hotspur" A for loop can be used to cycle through each set of keys and values in the dictionary: Practice Task 1 a) Create a dictionary of your teachers and the subject they teach. b) Print their name and the subject they teach on each line. Example solution: Adding and Removing Data from a Dictionary Data can be added to a dictionary by stating the new key and value . You must use square brackets - [ ] The new data will be added to the end of the dictionary. You can print the whole dictionary to see any changes - e.g. print(playerdictionary) Data can be removed from a dictionary by stating the new key to remove in a pop command. You can print the whole dictionary to see any changes - e.g. print(playerdictionary) The whole dictionary can be cleared (reset to blank) using the clear command. Practice Task 2 a) Ask the user to enter a new teacher and their subject. b) Ask the user to remove a teacher. c) Print the list of teachers and check the new teacher has been added and the other one removed. Example solution: Searching Through a Dictionary An if statement can be used to check if a specific key is in a dictionary. If the key is in the dictionary then a message can be displayed using the key and the value . Otherwise, an else statement can output an appropriate response. To search for a value in a dictionary a for loop should be used to cycle through each key . If the value of each key matches the value that is being searched for then it will be printed. Practice Task 3 a) Create a search that allows a user to enter a teacher's name and prints the subject that they teach. b) Include an else statement to print a response if a teacher is not in the dictionary. Example solution: Changing Data & Copying a Dictionary The way to change values is similar to adding new data. The first input below is to determine the key and the second input determines the new value to be changed to. The copy command is used to make a duplicate of a dictionary . Practice Task 4 a) Create a copy of your teacher dictionary. b) Allow the user to enter a teacher and a new subject that they teach. c) Print the copy of the dictionary with the new values. Example solution: Using a Dictionary to Make a Game The code below is used to make a puzzle game where the user has to type in a footballer and the team they played for. I have added comments to explain the different parts of the code. A separate list has been created at the start to store the names of keys (players) that been correctly guessed . A while loop is used to constantly ask the user for players and teams. When they have guessed all 10 players (and the correct list reaches 10 ) the loop breaks and the game end. Instead of a further practice task here, Task 6 of the Section 8 Practice tasks page challenges you to make a similar game using a dictionary. ⬅ 8b - 2D Lists Section 8 Practice Tasks ➡

  • 1.2 - Types of Processor | OCR A-Level | CSNewbs

    Learn about the differences between CISC and RISC processors, GPUs and multicore and parallel systems. Based on the OCR H446 Computer Science A-Level specification. Exam Board: OCR A-Level 1.2 - Types of Processor Specification: Computer Science H446 Watch on YouTube : CISC and RISC GPUs Multicore & parallel systems Instruction Sets An instruction set is the complete list of machine code instructions a CPU is designed to execute as part of the FDE cycle . CISC (Complex Instruction Set Computer ) CPUs have a large set of complex instructions , so tasks can be achieved in fewer lines of code , but some instructions take multiple clock cycles . RISC (Reduced Instruction Set Computer ) CPUs use a smaller set of simple instructions , each designed to execute in a single clock cycle , making execution faster but sometimes requiring more instructions overall . GPUs A GPU (Graphics Processing Unit ) is a co-processor with thousands of smaller cores designed for parallel processing . This is in contrast to the CPU , which has fewer but more powerful cores . GPUs are used for rendering images , animations and video for fast , realistic graphics in games and multimedia . Because of their ability to handle many calculations at once , GPUs are widely used for non-graphical purposes too, such as machine learning , scientific simulations , data analysis and cryptocurrency mining . Multicore & Parallel Systems A multicore processor has multiple independent cores on a single CPU chip . Each core can carry out its own FDE cycle , so tasks can be split up , enabling multitasking and faster processing . However, only software designed to use multiple cores will benefit from this increased performance . A parallel system uses multiple processors (or cores ) working together on the same problem at the same time . This may involve multiple cores within one CPU or multiple CPUs in a single machine . Parallel processing greatly improves performance for tasks that can be divided into smaller sub-tasks , such as simulations and graphics rendering . However, some problems cannot be parallelised because they must be executed sequentially . Q uesto's K ey T erms Instruction Sets: instruction set, complex instruction set computer (CISC) , reduced instruction set computer (RISC) GPUs: graphics processing unit (GPU) Multicore Systems: multicore systems, parallel processing D id Y ou K now? Sony coined the term ' GPU ' for the PlayStation (1994), making it one of the first home consoles with a dedicated graphics processor . The term was later popularised further by NVIDIA in 1999 with the GeForce 256 . 1.1 - The Processor A-Level Topics 1.3 - Input, Output & Storage

  • Python | 5c - Date & Time | CSNewbs

    Learn how to use time commands to display the current date and time in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python 5c - Time & Date ctime() The easiest way to output the current time and date is to use the ctime() command. Import the ctime command from the time library before you use and print it: from time import ctime print ( "Current time:" , ctime()) = Current time: Wed Sep 13 16:07:20 2023 This will print the time and date, but it looks rather unprofessional, and the exact format depends on the type of system that you are currently running so it may vary for different users. Date / Time Task 1 ( Dentist Surgery) Print a greeting for a dentist surgery with the current date and time. Example solution: Welcome to Greenvale Dentist Surgery, it is currently: Wed Sep 13 16:16:24 2023 strftime() A better alternative to the ctime() command is to use strftime() which stands for str ing f rom time as you can select specific parts of the date and time to display. This command requires a directive to be written with a percentage symbol as a string in the brackets . For example, the current hour (%H ), minute (%M ) and second (%S ) can be printed between colons to show the time . from time import strftime print ( "The current time is" , strftime( "%H:%M:%S" )) = The current time is 13:18:57 There are many different directives that you can use to display exactly what you are looking for, such as: from time import strftime day = strftime( "%A" ) print ( "The current day is" , day) month = strftime( "%B" ) print ( "The current month is" , month) year = strftime( "%Y" ) print ( "The current year is" , year) = The current day is Thursday The current month is September The current year is 2023 The following directives can be used with strftime(). Don't forget that directives must be typed within speech marks . Date - Weekday: %a – Current day of the week abbreviated (e.g. Sun, Mon) %A – Current day of the week in full (e.g. Sunday, Monday) %w – Current day of the week in chronological order (0 is Sunday and 6 is Saturday) %W – Current week number (e.g. 01, 26, 52) Month: %d – Current day of the month (e.g. 01, 11, 31) %m – Current month as a number (e.g. 01, 06, 12) %b – Current month abbreviated (e.g. Jan, Jun, Dec) %B – Current month in full (e.g. January, December) Year: %y – Current year abbreviated (e.g. 16, 17) %Y – Current year in full (e.g. 2016, 2017) %j – Current day of the year (e.g. 001, 150, 365) Time - Hour: %H – Current hour in 24-hour clock (e.g. 00, 12, 20) %I – Current hour in 12-hour clock (e.g. 01, 08, 12) %p – Whether it is currently AM or PM Minute: %M – Current minute (e.g. 00, 30, 59) Second: %S – Current second (e.g. 00, 30, 59) More Directives - %z – Current time difference from UTC (Co-ordinated Universal Time) (e.g. +0000, -0500, +1100) %Z – Current time zone (e.g. GMT Standard Time, EST, CST) Just looking for a quick date or time display and not bothered about customisation? Try these: %c – Current date and time in full (e.g. Tue Feb 19 13:35:20 2016) %x – Current date (e.g. 19/02/16) %X – Current time (13:36:20) Date / Time Task 2 ( Calendar App ) Create a program that asks the user if they want to see the current date , the current time or 'other '. Use the strfftime directives above to show what the user asks for. It's up to you which directives you use for the 'other' option , such as displaying the current day of the year (%j ) or current week of the year (%W ). Example solutions: Type TIME for the current time, DATE for the current date or OTHER: TIME The current time is 13:46PM Type TIME for the current time, DATE for the current date or OTHER: DATE The date today is Thursday 14 September 2023 Type TIME for the current time, DATE for the current date or OTHER: OTHER Did you know today is day number 257 of 2023? Between Dates You may want to work out the number of days between two dates . This can be done by importing the date command from the timedate library. Below is a simple example: from datetime import date date1 = date(2021,9,15) date2 = date(2022,1,20) difference = date2 - date1 print ( "There are" , difference.days , "days between" , date1 , "and" , date2) Make sure the date is entered in the format of year, month, day . The .days code removes the difference in hours and seconds to just display the number of days difference. There are 127 days between 2021-09-15 and 2022-01-20 Today's Date The program here uses strftime to check the current year, month and day and organise it into the date format . This can then be used together with code similar to the program above to check the number of days between one specific date and the current date. from datetime import date from time import strftime thisyear = int (strftime( "%Y" )) thismonth = int (strftime( "%m" )) thisday = int (strftime( "%d" )) todaysdate = date(thisyear,thismonth,thisday) print ( "The date today is" , todaysdate ) The date today is 2023-09-14 Input a Date The program here shows how to input a date into a format that can then be used by Python to work out the difference between two dates . from datetime import date year = int ( input ( "Enter a year: " ) month = int ( input ( "Enter a month: " ) day = int ( input ( "Enter a day: " ) chosendate = date(year,month,day) print ( "The chosen date is" , chosendate ) Enter a year: 1964 Enter a month: 5 Enter a day: 13 The chosen date is 1964-05-13 Date / Time Task 3 ( Days Alive) Create a program that works out how long the user has been alive for . Use the examples above to automatically make today's date and then allow the user to input their year , month and day of birth. Get Python to work out the difference between today and their date of birth. Example solutions: Enter a year: 1998 Enter a month: 3 Enter a day: 29 You have been alive for 9300 days! Enter a year: 2007 Enter a month: 12 Enter a day: 25 You have been alive for 5742 days! ⬅ 5b - Sleep 5d - Colorama ➡

  • 4.1 - Gathering Client Requirements | F160 | Cambridge Advanced National in Computing AAQ

    Learn about the methods of gathering client requirements such as document analysis, focus groups, interviews, meetings, observation, problem reports, questionnaires, shadowing and suggestion 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) 4.1 - Methods of Gathering Client Requirements Watch on YouTube : Gathering Client Requirements For each of the nine methods of gathering client requirements , you need to know : Its purpose and when it would be used . The type of information and data that can be collected using it. The advantages and disadvantages of using it. How client requirements determine if it would be used. Gathering Client Requirements Methods of Gathering Client Requirements T here are nine methods of gathering client requirements you need to know : Reviewing existing documents (e.g. manuals and reports ) to understand the current system and requirements . Gathering a small group of users or stakeholders to discuss needs , expectations and ideas . Asking stakeholders structured or open-ended questions to collect detailed requirements . Bringing together clients and developers to share information , clarify requirements , and make decisions . Watching users perform tasks to see how they interact with the current system . Using logged issues or complaints from an existing system to identify new requirements . Distributing structured forms with questions to gather requirements from a wide group quickly . Following a user during their normal tasks to gain deeper insights into workflows and needs . Reviewing client or user-submitted ideas and feedback to shape requirements . Q uesto's Q uestions 4.1 - Methods of Gathering Client Requirements: 1. Explain what document analysis , problem reports , shadowing and suggestion analysis are. [8 ] 2. Give two advantages and two disadvantages of two other methods not mentioned in Q1 . [8 ] 3. The video game company that makes the ' Age of the Dragon ' series faced a letdown in their previous release , ' The Guard of the Veil '. They need to ensure that their next game sells a lot of copies and meets user requirements . Justify which methods they should use to gather client requirements and why . [ 5 ] The original 2010 movie version of ' Scott Pilgrim vs. the World ' had Scott end up with Knives Chau instead of Ramona Flowers , but focus groups disliked that he spent the whole movie fighting for her for nothing , so it was changed . D id Y ou K now? 3.2 - Project Planning Tools Topic List 4.2 - Client Requirement Specifications

© CSNewbs 2025

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