Search CSNewbs
304 results found with an empty search
- Greenfoot | Common Errors | CSNewbs
The most common errors made in Grennfoot when making a game and how to fix them, including when missing punctuation is expected or the end of file is reached while parsing. Common Greenfoot Errors Greenfoot Home If the world becomes greyed out and you can't click on anything then an error has occurred. The actor with the error will have red lines on it. When an error occurs, a red squiggly line will appear underneath the problem. Hover your mouse over the line and a helpful message will appear to help you solve the issue. Some of the more common errors (and how to fix them) are listed below: ; expected Every line with a white background must end in a semi colon ( ; ) ) expected You have missed a bracket . Count the number of open brackets and the number of closed brackets on a line and make sure you have an equal number of both. reached end of file while parsing You are missing at least one curly bracket ( } ) at the end of your program . Press enter to move onto a new line at the bottom; you must have a closed curly bracket with a yellow background and another closed curly bracket with a green background . cannot find symbol You have typed a command incorrectly . Greenfoot uses a system where commands have no spaces and each word after the first word is uppercase . Such as isKeyDown not IsKeyDown and not isKeydown. Check your spelling and capitals carefully. Stuck ? If you start typing but can't remember what commands come next, press Ctrl and Space together to show a list of all possible commands that you can use.
- 5.3 - HCI Designs, Documents, Diagrams | F160 | Cambridge Advanced National in Computing AAQ
Learn about designs, documents and diagrams related to human-computer interaction including processing and data handling, data flow diagrams (level 0 and level 1), flowcharts and user interface designs (visualisation and wireframe diagrams). 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) 5.3 - Human Computer Interface Designs, Documents and Diagrams Watch on YouTube : Data flow diagrams Flowcharts Visualisation diagrams Wireframe diagrams There are four types of documents / diagrams you need to know that can be used to design human-computer interfaces : data flow diagrams (DFDs ), flowcharts , visualisation diagrams and wireframe designs . For each type of diagram , you need to know its components and conventions , when it is appropriate for use , and how to create it . Each diagram is also effective for different uses and you must be able to consider how specific diagrams can be made more effective . Human-Computer Interface Diagrams Data Flow Diagrams A data flow diagram (DFD ) is a visual representation of how data is transferred within a system or organisation . They do not show decision logic or sequencing , but focus on where data comes from , where it goes and how it is processed . DFDs are typically categorised into Level 0 and Level 1 formats, which differ based on complexity . Flowcharts A flowchart is a diagram that shows the sequence of steps in a process using specific symbols . Flowcharts can be used as a project planning tool (section 3.2 ) to visualise workflows , task order and decision-making paths . It is also useful as a human-computer interface diagram to show the steps and decisions users may take as they interact with the application . The video says ' 3.2d ' because flowcharts also appear in section 3.2 as a project planning tool . Visualisation Diagrams Visualisation diagrams are graphical representations used to show the layout , structure and appearance of a software application's interface . They're often used for planning , design and feedback purposes. Traditionally, they would be drawn on paper in pencil and annotated , but modern diagrams are mocked up on a computer so they can be easily shared with team members and clients . Wireframe Diagrams Wireframe diagrams are basic visual guides used to represent the structure and layout of a user interface (UI ) without any design styling . They focus on function , layout and interaction , not aesthetics . Wireframe diagrams are used in the early design stages to plan the UI layout before visual design begins. Q uesto's Q uestions 5.3 - Human Computer Interface Designs, Documents & Diagrams: 1. Explain what the purpose of data flow diagrams are, the difference between Level 0 and Level 1 and what makes them effective . [6 ] 2. Draw a wireframe diagram for the YouTube homepage . [3 ] 3. Explain how visualisation diagrams are created and how they can be made more effective . [ 5 ] The first type of flowchart , the ' flow process chart ', was developed by engineers Frank and Lillian Gilbreth in 1921 . The book (and original movie ) ' Cheaper by the Dozen ' is about this couple . D id Y ou K now? 5.2 - Visual Design Considerations Topic List 6.1 - Job Roles
- 2.2 - Data Flow | F161 | Cambridge Advanced National in Computing | AAQ
Learn about how data is input to an application to be converted and output as information. Covers types of data and information such as numbers, text, audio and images as well as the black box concept to show data flow in a diagram. Resources based on Unit F161 (Developing Application Software) for the OCR Cambridge Advanced Nationals in Computing (H029 / H129) AAQ (Alternative Academic Qualification). Qualification: Cambridge Advanced Nationals in Computing (AAQ) Certificate: Computing: Application Development (H029 / H129) Unit: F161: Developing Application Software 2.2 - Data Flow Watch on YouTube : Data vs Information Data Input Information Output Black Box Concept You need to know the difference between the terms 'data ' and 'information ' and how data is input to be converted to information as an output . There are specific types of input and output , including numbers , text , movement , audio and images . You need to understand how data and information flows through application software and can be stored . You must be able to represent data flow in a diagram using the black box concept . What You Need to Know Data and Information ? YouTube video uploading soon Data Input ? YouTube video uploading soon Information Output ? YouTube video uploading soon Black Box Concept ? YouTube video uploading soon Q uesto's Q uestions 2.2 - Data Flow: 1. What? [2 ] 2. What? [1 ] 3. What? [1 ] 4. What? [1 ] ? D id Y ou K now? 2.1 - Data Formats & Types Topic List 2.3 - Data States
- Python | 5a - Random | CSNewbs
Learn how to use random commands in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python 5a - Random Importing Section 5 looks at additional commands that you can import and use from Python’s code libraries . A library is a collection of different commands that automatically come with Python but are separate from the main file. They can be imported (brought in) to your program by using the import command at the start of your program . Imagine Python’s library to be similar to an actual library. There are different sections in a real library (such as History, Geography, Reference) and different sections in Python’s library (such as random or time ). Each real library has many individual books in each section, just like commands in Python. randint() choice() sample() shuffle() random sleep() ctime() strftime() time from random import randint from time import ctime You can import a specific command from one of Python's libraries using the from and import commands at the top of your program . Random Numbers To generate random numbers , first import the randint command section from Python’s random code library on the first line of the program. The randint command stands for random integer . In brackets, state the number range to randomly choose from. The random value should be saved into a variable . from random import randint number = randint(1,100) print ( "A random number between 1 and 100 is" , number) = A random number between 1 and 100 is 39 = A random number between 1 and 100 is 73 = A random number between 1 and 100 is 4 The randint range does not have to be fixed values and could be replaced by variables . Below is a program where the user selects the upper and lower values of the range: from random import randint lower = int ( input ( "What is the lowest number? " )) upper = int ( input ( "What is the highest number? " )) number = randint(lower,upper) print ( "A random number between" , lower , "and" , upper , "is" , number) = What is the lowest number? 1 What is the highest number? 50 A random number between 1 and 50 is 36 = What is the lowest number? 500 What is the highest number? 1000 A random number between 500 and 1000 is 868 Random Numbers Task 1 ( Ice Comet) A special comet made of ice passes the Earth only once every one hundred years , and it hasn't been seen yet in the 21st century . Use the randint command to randomly print a year between the current year and 2099 . Example solutions: Did you know it won't be until 2032 that the ice comet will next pass Earth!? Did you know it won't be until 2075 that the ice comet will next pass Earth!? Random Numbers Task 2 ( Guess the Number) Use randint to generate a random number between 1 and 5 . Ask the user to enter a guess for the number with int and input . Print the random number and use an if statement to check if there is a match , printing an appropriate statement if there is and something different if there is not a match . Example solutions: Enter a number between 1 and 5: 4 Computer's number: 5 No match this time! Enter a number between 1 and 5: 3 Computer's number: 3 Well guessed! It's a match! Choice - Random Word Rather than just numbers, we can also randomly generate characters or strings from a specified range by using the choice command. You must first import the choice command from the random library. Choice works well with a list of values , which require square brackets and commas separating each word . Below is a program that randomly chooses from a list of animals : from random import choice animals = [ "cat" , "dog" , "horse" , "cow"] randomanimal = choice(animals) print ( "A random animal is" , randomanimal) = A random animal is cat = A random animal is horse Choice - Random Character Instead of using a list you can randomly select a character from a string . The program below randomly selects a character from the variable named 'letters ' which is the alphabet . from random import choice letters = "abcdefghijklmnopqrstuvwxyz" randomletter = choice(letters) print ( "A random letter is" , randomletter) = A random letter is e = A random letter is y Random Choice Task 1 ( Holiday Destinations ) Harriet can't decide where to go on holiday and needs help deciding. Make a list of at least 6 destinations (see the animal example above ) and use the choice command (don't forget to import it from the random library ) to print a random destination . Example solutions: Why don't you go to Paris on holiday? Why don't you go to Barcelona on holiday? Random Choice Task 2 ( Vowels ) Use the choice command to randomly select a vowel (look at the alphabet example above ). Ask the user to input a vowel and use an if statement to check if the user's letter matches the randomly selected letter . Print a suitable statement if they match and something else if they don't . Example solutions: Enter a vowel: i Random vowel: i The vowels matched! Enter a vowel: o Random vowel: u The vowels didn't match! Sample - Random Strings To choose more than one value from a set of data, use the sample command. Sample is used with a list of values and a number representing how many from that list to pick. The code sample(days,2) picks two random values from the list called days . Both examples below perform the same task but, as with most code, there is no one way to solve a problem. from random import sample days = [ "Monday" , "Tuesday" , "Wednesday" , "Thursday" , "Friday" ] two_days = sample(days , 2) print ( "You will be set homework on:" , *two_days) A separate list and then a sample . = You will be set homework on: Thursday Monday = You will be set homework on: Friday Tuesday from random import sample two_days = sample([ "Monday" , "Tuesday" , "Wednesday" , "Thursday" , "Friday" ] , 2) print ( "You will be set homework on:" , *two_days) The list and sample is combined on one line. The sample command actually makes a new list with the number of values selected (e.g. ["Tuesday" , "Thursday"] in the examples above). You can use an asterisk - * - directly before the sampled variable to print just the list values , otherwise the brackets and apostrophes will be printed too. from random import sample names = sample([ "Bob" , "Ben" , "Jen" , "Ken" ] , 2) print ( "The names are:" , names) from random import sample names = sample([ "Bob" , "Ben" , "Jen" , "Ken" ] , 2) print ( "The names are:" , *names) The names are: ['Bob', 'Jen'] The names are: Bob Jen Sample - Random Numbers You can also use the sample command to choose several integers from a given range. By implementing the range command you don’t need to individually write out each number. from random import sample numbers = sample( range (1,100) , 5) print ( "Five random numbers between 1 and 100 are:" , *numbers) Five random numbers between 1 and 100 are: 53 42 11 8 20 Five random numbers between 1 and 100 are: 74 52 51 1 6 Random Samples Task 1 ( Frost Comets) The ice comet from a previous task has broken up into four smaller frosty comets that could pass the Earth anytime from next year to the year 2095 . Print four random years in that range . Example solutions: I predict the frost comets will be seen in these years: 2093 2036 2027 2091 I predict the frost comets will be seen in these years: 2076 2033 2053 2085 Random Samples Task 2 ( Baby Boy ) Aunt Meredith is having a baby boy . Create a program that randomly selects 3 male names from a list of 10 possible names . Example solutions: Hey Aunt Meredith, how about these names: Charlie Eddie Frank Hey Aunt Meredith, how about these names: George Harold Bill ⬅ Section 4 Practice Tasks 5b - Sleep ➡
- Greenfoot Guide #1 | World Setup | CSNewbs
Learn how to start a new Greenfoot program and set up the world and actors ready for the next steps in creating a game. Part 1 of the Greenfoot Tutorial for the Eduqas/WJEC GCSE 2016 specification. 1. Setup & Populating the World Greenfoot Tutorial 1. Open Greenfoot This tutorial uses Version 2.4.2 which is the version students are given to use in the WJEC/Eduqas Component 2 exam . Click here for more information and how to download 2.4.2 . If you are using a more recent version the code should still work but the look of the program in the screenshots may be different. In the Component 2 exam of the 2016 WJEC/Eduqas specification you would skip ahead to the New Object Placements stage further down this page as the classes should be set up for you. Watch on YouTube: 2. New Scenario For a new project, click ' Scenario ' and then ' New '. If you are using a more recent version of Greenfoot select ' New Java Scenario '. Save this new project in a suitable location such as a folder named 'Greenfoot' . You may wish to save this project as ' SimpleGame ' or ' ExampleGame '. 3. Setup the MyWorld class The first thing to do is to create a subclass of World called MyWorld which becomes our background object. Right-click on the World class and select 'New subclass... ' Set the New class name to MyWorld . Choose any image from the 'backgrounds ' image category. I have chosen the 'cell.jpg ' image. Click the Compile button in the bottom right of the Greenfoot window to save the program . 4. Create the Main Character class Now to create a new class for the main character. Right-click on the Actor class and select 'New subclass... ' Give the new object an appropriate name and choose a relevant image . I have named my class 'Sheep ' and selected the sheep.png image. 5. Right-click on Actor and create two more classes: Collectable objects to pick up (e.g. my orange) An enemy character to avoid (e.g. my elephant) Don't forget to compile the program. Watch on YouTube: After creating your classes you must move them over to the game world. This is known as populating the world . 1. New Object Placements Right-click on your main character object and select the top option e.g. 'new Sheep()'. Drag your mouse to the world and click to drop it. Complete the following actions: Place 1 main character object. Place 5 collectible objects. Place 2 enemy objects. 2. Save the World Once you have populated your world with objects then right-click anywhere on the background and select 'Save the World '. This saves the positions of each object so that it won't reset every time you start a new game. You can close the MyWorld code that automatically opens when you save the world, we never add any code to this window. Part 2 - Movement (Arrow Keys) >
- 3.1a - 3.1d - Algorithm Complexity | OCR A-Level | CSNewbs
Learn about pseudocode, procedural programming, big O notation (constant, linear, polynomial (quadratic), exponential, linearithmic and logartihmic) and the complexity of different data structure, sorting and searching algorithms. Based on the OCR H446 Computer Science A-Level specification. Exam Board: OCR A-Level Specification: Computer Science H446 3.1a - 3.1d - Algorithm Complexity Watch on YouTube : Pseudocode Procedural programming Big O notation Algorithm complexity Pseudocode Pseudocode is a simplified , language-independent way of writing algorithms that looks like programming but uses plain English to describe the steps clearly without worrying about exact syntax . The OCR A-Level Computer Science course uses a form of pseudocode unique to the exam board called 'OCR exam reference language ' that all code in exams will be written in . OCR exam reference language uses closing commands such as endif for an if statement and endwhile for a while loop . It also uses the word then instead of a colon like in Python . YouTube video uploading soon Procedural Language A procedural language , such as Python or Java , is a programming language that structures programs as sequences of step-by-step instructions grouped into procedures or functions . It focuses on breaking tasks into smaller , reusable blocks of code that operate on data , making programs easier to write , understand and maintain . This topic is in both Paper 1 and Paper 2 . YouTube video uploading soon Big O Notation O(n) Big O Notation is a way of describing how the time complexity (how long an algorithm takes ) and space complexity (how much memory it uses ) grows as the size of the input increases . This allows algorithms to be compared in terms of efficiency , using the letter n to refer to the size of the input . Complexity types: Constant - O(1) - The algorithm’s time or space stays the same no matter how large the input is . Linear - O(n) - The time or memory grows directly in proportion to the size of the input . Polynomial - O(n²) - The growth increases in proportion to the square of the input , often seen in algorithms with nested loops . Exponential - O(2ⁿ) - The time or memory doubles with each additional input element , becoming extremely slow very quickly . Logarithmic - O(log n) - The algorithm’s time grows very slowly as the input size increases , often achieved by repeatedly halving the data . Linearithmic - O(n log n) - A combination of linear and logarithmic behaviour, common in efficient sorting algorithms like merge sort . YouTube video uploading soon Algorithm Complexity Best-case , average-case and worst-case complexity describe how an algorithm performs under different input conditions . Best-case complexity is the time or space required when the algorithm meets the most favourable input , allowing it to finish as quickly or efficiently as possible . Average-case complexity represents the expected performance across typical or random inputs , giving a realistic view of how the algorithm behaves in normal use . Worst-case complexity is the maximum time or space the algorithm could ever require , used to guarantee performance even in the least favourable situation . Sorting and searching algorithms often have different case complexities for time and space . YouTube video uploading soon This page is under active development. Check here for the latest progress update. Q uesto's K ey T erms Pseudocode Procedural Language: input, output, comments, variables, casting, count-controlled iteration, condition-controlled iteration, logical operators, selection, string handling, subroutines, arrays, files Big O Notation: time complexity, space complexity, constant, linear, polynomial, exponential, logarithmic, linearithmic, best-case, average-case, worst-case D id Y ou K now? Minecraft doesn’t load the entire world at once ; instead, it divides the world into chunks and only generates or loads the chunks near the player . Finding , saving and retrieving these chunks uses data structures like trees and hash maps , which allow the game to look up a chunk in about O(log n) or even O(1) time , minimising lag even in large worlds . 2.2 - Computational Methods A-Level Topics 3.1e - Data Structure Algorithms
- 11.2 - Legislation - Eduqas GCSE (2020 Spec) | CSNewbs
Learn about key computing laws including the Data Protection Act (2018) (GDPR), Computer Misuse Act (1990), Copyright Designs and Patents Act (1988), Creative Commons and the Regulation of Investigatory Powers Act. Based on the 2020 Eduqas (WJEC) GCSE specification. 11.2: Legislation Exam Board: Eduqas / WJEC Specification: 2020 + Data Protection Act (2018) In 2018 the European Union introduced GDPR (General Data Protection Regulation ) to protect the privacy of data for people in the EU. The UK matched this by updating the Data Protection Act introduced in 1998 to become the Data Protection Act (2018) . This act protects the data of individuals that is stored on computers and processed by organisations. How the Data Protection Act works: Each person who has their data stored is known as a data subject . An employee within an organisation must be appointed as a data controller and it is they who are responsible for registering with the Information Commissioner . The Information Commissioner is the person in the UK who is responsible for managing several laws , most significantly the Data Protection Act. When registering with the Information Commissioner, the organisation's data controller must be clear on exactly: What information they are collecting, Why it is being collected, What the data will be used for . The six principles of the Data Protection Act state that data must be: 1. Collected lawfully and processed fairly. 2. Only used for the reasons specified. 3. Data must be relevant and not excessive. 4. Data must be accurate and up-to-date. 5. Data must not be stored for longer than necessary, 6. Data must be stored and processed securely. Computer Misuse Act (1990) This act was introduced as computers became cheaper and more common at home and work . The act attempts to stop and punish those who use computers inappropriately . Breaking any of the three principles could result in fines and a jail sentence but only if it can be proved it was done on purpose and not by accident. The Computer Misuse Act (1990 ) includes three main principles : 1. No unauthorised access to data. Example: Hacking a computer system. 2. No unauthorised access to data that could be used for further illegal activities. Example: Accessing personal data to use as blackmail or identity theft. 3. No unauthorised modification of data. Example: Spreading a virus to change data. Freedom of Information Act (2000) This act allows people to request public authorities to release information . Public authorities include local councils , government departments , universities and hospitals . A freedom of information request must be formally submitted in a letter or email and a reply from the organisation is required within twenty days of receiving the request. A simple freedom of information request might be the average response times of the local ambulance service in the past year. Certain requests will not be accepted , such as if processing the request would be too expensive or if it involves sensitive information protected by the Data Protection Act (2018 ). Regulation of Investigatory Powers Act (2000) This act (often shortened to RIPA ) was introduced in response to the increase in both criminal and terrorist activities on the internet, it is used to monitor and access online communication of suspected criminals . If criminal activity is suspected by an individual then this act grants the following powers : Internet Service Providers (ISPs) must provide access to the suspect's online communication , such as emails or social media. Locked or encrypted data may be accessed such as online messages. ISPs could install surveillance equipment or software to track the suspect's online activity . Surveillance may take place to physically track the suspect , e.g. in private vans or by undercover officers in public spaces. Access must be granted to personal information . This act became controversial as its use widened and local councils were using it for minor offences - a Scottish council used the act to monitor dog barking and a council in Cumbria gathered video evidence about who was feeding pigeons . The act has since been changed to only allow the surveillance of crime suspects . Copyright, Designs & Patents Act (1988) This act makes it a criminal offence to copy work that is not your own without the permission of the creator or the copyright holder. This can refer to text, images, music, videos or software. Owning the copyright of an image might not prevent others from copying and using it but this act means that the owner can bring legal proceedings in court to those who have stolen their work . However, it is difficult to trace who has stolen work once it has been uploaded to the internet and copies can easily spread, especially television shows and movies. This act specifically prohibits the following actions: Making copies of copyrighted material to sell to others . Importing and downloading illegally copied material (except for personal use). Distributing enough copyrighted material to have a noticeable effect on the copyright holder . Possessing equipment used to copy copyrighted material , as part of a business. Creative Commons (CC) Licensing A CC licence allows people to share their copyrighted work while still retaining rights to the material . There are different types of licence that specify exactly what can and can't be done to the copyrighted material. For example: An attribution licence allows copyrighted material to be edited and distributed but the original owner must be credited . A non-commercial licence allows copyrighted material to be shared and edited but no profit must be gained through its distribution. CC licences are not automatically given , they must be granted by the copyright owner . To ensure you are not illegally using copyrighted work change the Tools and Licence setting when using Google Images to filter work with CC licenses applied . Telecommunications Regulation Act (2000) This act allows organisations to lawfully monitor communications made online and on the phone by employees while at work . All users of the network should be aware that their communication is being monitored when they are using emails , the internet or telephone calls . The act was introduced to ensure that employees are using the computer systems for the correct purpose , to prevent illegal activity and to monitor staff performance . Codes of Conduct One way that organisations try to ensure that staff are held to professional standards and display appropriate behaviour is to create a code of conduct . This is a set of rules or requirements that employees must follow or they may be punished, such as a temporary ban from the network or being fired. There are two types of codes of conduct: Formal codes of conduct are a set of written rules that clearly state expected behaviour , such as what employees can access online at work . Schools may have this too, and you might have to sign a document at the start of the year before you can use the computers. Informal codes of conduct are used by small organisations where there might not be a written set of rules , but newer employees follow the habits and expectations of senior members of staff. This is harder to monitor but provides a more relaxed working environment. Q uesto's Q uestions 11.2 - Legislation: 1a. State the 6 principles of the Data Protection Act (2018) . [ 6 ] 1b. Explain how the Data Protection Act works . In your answer, you should include definitions of a data subject , the data controller and the Data Commissioner . [ 6 ] 2. Describe the 4 principles of the Computer Misuse Act (1990) . [3 ] 3. Describe the purpose of the Freedom of Information Act (1990) and state an example of a freedom request . [ 3 ] 4a. What is the purpose of RIPA (2000) ? [ 2 ] 4b. Describe 3 actions that RIPA (2000) allows the government / police to do . [ 3 ] 5a. What is the purpose of the Copyright, Designs & Patents Act (1988) ? [ 2 ] 5b. Describe 3 actions that CDPA (1988) prohibits . [ 3 ] 6a. What is a Creative Commons ( CC ) licence ? [ 2 ] 6b. Describe 2 types of CC licence . [ 4 ] 7a. What is the purpose of the Telecommunications Regulation Act (2003) ? [ 2 ] 7b. Describe 3 reasons why this act was introduced . [ 3 ] 8a. What is the purpose of a code of conduct ? [ 2 ] 8b. Describe the difference between formal and informal codes of conduct . [ 2 ] 11.1 - Impacts of Technology Theory Topics
- Key Stage 3 Python | Turtle | CSNewbs
The final part of a quick guide to the basics of Python aimed at Key Stage 3 students. Learn about importing turtle to command a moving object. Python - #6 - Turtle Import the Turtle The turtle library stores all of the code to create and move an object called a turtle . The turtle library must be imported into your Python program before you can use it to draw lines, shapes and colours . Create a new Python program and save the file as PythonTurtle . Write import turtle as the first line of code. Basic Shapes The turtle can be controlled by writing how many pixels it should travel forward and the angle it should point left or right . Moving Forwards turtle.forward(100) will move the turtle forward by 100 pixels. turtle.forward(200) will move the turtle forward by 200 pixels. When using the left command or the right command, the turtle won't actually move , but it will rotate by the number of degrees that you state. For example, typing turtle.left(90) will point the turtle upwards . Rotating Left & Right Copy the code to the right to make the turtle draw a square. Then try to make: A Rectangle A Triangle A Pentagon A Hexagon Square Rectangle Triangle Pentagon Hexagon Hint: To work out the angles, divide 360 by the number of sides. Using Loops You can use a for loop to repeat code . This is especially helpfully with intricate shapes with many sides. The code below will print a square but in only 3 lines instead of the 8 lines from task 2. This is the number of times the code underneath will be repeated . Change it to a higher number to repeat it more often . Each line after the 'for num in range' line must be indented . Press the tab key once on your keyboard to indent your code. Task 3 - Copy the code above to make the turtle draw a square using a loop. Then try to make: A Heptagon An Octagon A Circle A Pentagram (5-sided Star) Square Heptagon Octagon Circle Pentagram Hint: To work out the angles, divide 360 by the number of sides. Advanced Features Choose a background colour turtle .bgcolor("red") Choose the line size and colour turtle.pensize(6) turtle.color("green") Fill a shape turtle.color("yellow") turtle.begin_fill() (put your turtle's directions in here) turtle.end_fill() Lift the pen turtle.penup() turtle.pendown() Speed up/Slow down the turtle turtle.speed(speed=10) Change the turtle's appearance turtle.shape("turtle") Other options include "circle" and "arrow". Task 4 - Use the code above to make: A blue square on a red background. A yellow triangle on a pink background. Two different coloured circles - not touching each other. Three different shapes of three different colours - not touching each other. Complex Shapes Use everything that you have learned on this page to help you create more complex shapes. You could try: A Flower A Word (like your name - you will need to use the penup() and pendown() commands. A Christmas tree A Landscape (green ground, blue sky, yellow sun) <<< Selection
- Expansion Cards | Key Stage 3 | CSNewbs
Learn about two important expansion cards that can be connected to the motherboard - graphics cards and sound cards - and how they work. Expansion Cards PCI slots What are expansion cards? Expansion cards are additional components that you plug into the motherboard’s expansion slots to add or enhance features . The slots are called PCI (on older computers ) or PCIe (on newer models ). Common types are graphics cards (video ), sound cards (audio ), network cards (internet ) and capture cards (streaming ). Graphics Card A graphics card processes images , videos and 3D graphics so they look smooth and realistic . It is used for gaming , video editing , 3D modelling and Virtual Reality (VR ). It has its own processor - the Graphics Processing Unit (GPU ) - and dedicated memory (VRAM ), so it doesn’t overload the CPU or RAM . Modern graphics cards can also handle tasks like artificial intelligence (AI ) and bitcoin mining . Graphics cards usually have a cooling system, like a fan , so it doesn't overheat. The graphics processing unit ( GPU ) is a chip that renders images and video. The graphics card has ports such as HDMI or DisplayPort to connect monitors or TVs. The PCIe connector allows the graphics card to slot onto the motherboard. Sound Card The DAC ( Digital-to-Analogue Converter ) converts digital data (1s and 0s) from the computer into analogue sound waves for speakers/headphones. The ADC ( Analogue-to-Digital Converter ) converts analogue input (like voice from a microphone) into digital data the computer understands. Jacks are small round sockets where you plug in audio devices like headphones, microphones, or speakers. The PCIe connector allows the sound card to slot onto the motherboard. A sound card improves the quality of audio input/output compared to the motherboard’s built-in sound . They are not needed by most users , because of the motherboard's built-in sound , but they are used by music production , gaming or professional audio work . It can support surround sound systems , high-quality microphones , and musical instruments using jacks (audio ports ). Integrated cards Built directly into the motherboard . Cheaper , uses less power and is good enough for basic tasks (e.g. web browsing , watching videos and office work ). Shares the computer’s RAM and processor (CPU ) instead of having its own . An example is integrated graphics on a laptop for browsing and schoolwork . Dedicated cards These are separate expansion cards (e.g. graphics card or sound card ) to connect to the motherboard 's PCIe slots . They usually have their own processor and memory (e.g. GPU & VRAM for graphics ). Much more powerful , ideal for gaming , video editing , 3D design or professional audio . Uses more power and costs more . KS3 Home
- 1.1a - The CPU - OCR GCSE (J277 Spec) | CSNewbs
Learn about the components of the Central Processing Unit (CPU) and Von Neumann architecture. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). Exam Board: OCR 1.1a: The CPU Specification: J277 Watch on YouTube : Purpose of the CPU CPU Components Von Neumann Architecture The Central Processing Unit ( CPU ) is the most important component in any computer system. Like many computer components, it is attached to the motherboard . The purpose of the CPU is to process data and instructions by constantly repeating the fetch-execute cycle . CPU Components The Control Unit (CU ) sends control signals to direct the operation of the CPU . Control signals and timing signals are sent to the ALU and other components such as RAM . It also decodes instructions as part of the fetch-execute cycle . ALU stands for ‘ Arithmetic and Logic Unit ’. It performs simple calculations and logical operations . A register is a temporary storage space for one instruction or address . Different registers are used during the fetch-execute cycle . Cache memory is used to temporarily store data that is frequently accessed . Cache memory is split into different levels . Cache is slower to access than the registers but much faster than RAM . Computer Architecture The way a computer is designed and structured is known as its architecture . The most common type of computer architecture is Von Neumann . It is named after the mathematician John Von Neumann (pronounced Von Noy-man) Von Neumann Architecture A computer with Von Neumann architecture stores both program instructions and data in the same memory (RAM ) and in the same format (in binary ). Instructions (technically called the opcode ) and data (technically called the operand ) are not the same . An instruction is an action to perform and data is the value to be used. For example with the command 'ADD 43 ', ADD is the instruction and 43 is the data . Von Neumann architecture also contains the key CPU components of a control unit , arithmetic logic unit (ALU ), registers and cache memory . Q uesto's Q uestions 1.1a - The CPU: 1a. What does 'CPU ' stand for ? [1 ] 1b. What is the purpose of the CPU ? [ 2 ] 2. Draw a diagram of the CPU , and l abel the four main components . [ 4 ] 3. Describe the purpose of: a. The Control Unit [ 2 ] b. The ALU [ 2 ] c. The registers [ 2 ] d. Cache memory [ 2 ] 4a. Describe the key feature of Von Neumann architecture . [ 2 ] 4b. Explain how an instruction is different to data . [ 2 ] 1.1b - Registers & FE Cycle Theory Topics
- 5.1 - Data Types & Sources | Unit 2 | OCR Cambridge Technicals | CSNewbs
Learn about the different types of data and information sources. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification for Unit 2 (Global Information). 5.1 - Data Types & Sources Exam Board: OCR Specification: 2016 - Unit 2 Sources of Information Internal Source Information that comes from within an organisation , such as financial reports, data analysis or employee surveys. External Source Information that comes from outside of an organisation , such as government reports, financial data of competitors or price lists from suppliers. Types of Data Primary Data Data that has been created and collected by yourself or another employee within an organisation . For example, interviews or questionnaires sent within the company. Secondary Data Data that has been created and collected by someone outside of the organisation , such as national census data collected by the government or surveys taken by a competitor. Some secondary data may need to be purchased . Qualitative Data This is descriptive data , often composed of text , that can be observed but not measured . For example, survey responses where customers are asked why they visit a particular shop. Quantitative Data This is measured data , often in the form of numbers , percentages or statistics . For example, survey responses of the amount of time it takes to reach a shop. Q uesto's Q uestions 5.1 - Data Types & Sources: 1. A supermarket wants to find out how many of their customers have bought peaches this year compared to customers at a rival shop . Describe data that they could use for each of the source and data types below (e.g. stock information for peaches in the supermarket would be an internal source of information). Internal source External source Primary data Secondary data Qualitative data Quantitative data [6 ] "Why do you visit this supermarket?" 'Because it is close to home.' 'I like the easy access to parking.' 'I've always gone here.' "How many minutes does it take you to get here ?" 10 25 30 4.3 - Green IT Topic List 5.2 - Data Flow Diagrams
- 6.1 - Legal Considerations | F161 | Cambridge Advanced National in Computing | AAQ
Learn about legislation and regulations related to application development, including the Data Protection Act, Computer Misuse Act and Freedom of Information Act. Resources based on Unit F161 (Developing Application Software) for the OCR Cambridge Advanced Nationals in Computing (H029 / H129) AAQ (Alternative Academic Qualification). Qualification: Cambridge Advanced Nationals in Computing (AAQ) Certificate: Computing: Application Development (H029 / H129) Unit: F161: Developing Application Software 6.1 - Legal Considerations Watch on YouTube : Computer Misuse Act Data Protection Act UK General Data Protection Regulation Freedom of Information Act Privacy and Electronic Communications Regulations Independent bodies UK Information Commissioner's Office You need to know the latest version and main purpose of each act /regulation , as well as actions taken to comply with the act and the impacts of not complying with it. You must also understand how Privacy and Electronic Communications Regulations (PECR ) relate to the Data Protection Act and UK General Data Protection Regulation (UK GDPR ), and the role of the Information Commissioner's Office (ICO ) in the UK. What You Need to Know Computer Misuse Act ? YouTube video uploading soon Data Protection Act ? YouTube video uploading soon UK GDPR ? YouTube video uploading soon Freedom of Information Act ? YouTube video uploading soon PECR ? YouTube video uploading soon ICO & Independent Bodies ? YouTube video uploading soon Q uesto's Q uestions 6.1 - Legal Considerations: 1. What? [2 ] 2. What? [1 ] 3. What? [1 ] 4. What? [1 ] ? D id Y ou K now? 5.3 - Policies Topic List







