top of page

Search CSNewbs

286 items found for ""

  • 3.6 - Information Systems | Unit 2 | OCR Cambridge Technicals | CSNewbs

    3.6 - Information Systems Exam Board: OCR Specification: 2016 - Unit 2 Information systems, such as structured databases , can be defined primarily as either 'open ' or 'closed '. Open Information Systems Closed Information Systems ​ This type of system can interact with other information systems (e.g. another database) to exchange data , even from different platforms (types of computers).​ ​ Because it is open it is more at risk of data loss and/or hacking. ​ This type of system is private and cannot exchange data with other systems. ​​ Access is limited but it is much more secure than an open system. Q uesto's Q uestions 3.6 - Information Systems: ​ 1. Compare and contrast open and closed information systems . [4 ] 3.5 - Data Analysis Tools Topic List 4.1 - UK Legislation

  • Python | 10c - Remove & Edit Lines | CSNewbs

    Python 10c - REMOVE & Edit LINES Splitting a File The split command is used to split up a line of a file into different parts . ​ The character or string in brackets after the split command is the value that will denote each split . ​ In the example below I have split the file at each comma . Remember that Python numbering starts at 0 so the first section is 0, not 1. 0 1 2 3 The program below splits each line of the file at each forward-slash ( / ). ​ The printed statement is the employee's first name, surname and job position. 0 1 2 3 4 Practice Task 1 Create a file (new txt document in Notepad) called movies. ​ Type in the movie name, main actor, genre (e.g. horror), year it was released and your rating out of 10. ​ Print just the movie name and year it released. Example solution: Deleting Lines in a File Exact Line Name The code below shows how to remove a line from a file using the exact name of the line , which will only work for short or simple files . ​ First open the file in read move to save each line in a variable I've named lines. Then ask the user to input the exact line they want to remove (e.g. 'plum' in my example). ​ Then open the file in write mode and use a for loop to read each line and only write it back into the file if it isn't equal to the line the user entered - such as 'plum'. ​ The line.rstrip() command is important as it removes any spaces or empty lines that may interfere with matching the line to the input. Deleting Lines in a File Word in the Line The code below shows how to remove a line from a file if a certain word appears in that line , although this could be dangerous with large files. In my example I have written apple which has also removed pineapple! ​ The difference from the previous program is to change the for loop so that it checks if the inputted word appears in the line . If it does appear then nothing happens (except a print statement to acknowledge it's been found). If the word doesn't appear then that line can be safely rewritten to the file . Practice Task 2 Download the trees text file. ​ Give the user a choice of removing a specific tree or a type of tree. ​ If they choose a specific tree then remove the line if it is an exact match (e.g. Field Maple). ​ If they choose to remove a type of tree remove all lines that contain the name of that tree (e.g. willow) ​ Make sure you actually check the file to see if the lines have been removed correctly! Example solution: Download the trees file: Sorting a File Sorting a file into alphabetical (or numerical ) order is a simple process. ​ Open the file in read mode and save the lines into a list . ​ The sort c ommand will automatically order the list of lines. If necessary, in the brackets type reverse = True to sort the list in reverse. Practice Task 3 Expand on your tree program from the previous practice task. ​ As well as SPECIFIC or TYPE, allow the user to enter SORT to sort the tree file either in alphabetical order or reverse alphabetical order. ​ Check the text file to see if it has been sorted correctly. ​ You may make this a separate program from task 2 if you wish. Example solution: Editing Lines in a File Overwriting data in a file is a tricky process. ​ The program below uses the same Employees.txt file as above but allows the user to change the address of an employee . ​ A temporary file is created to store the lines of the employee file, but the line with the changes is replaced specifically with the new address. I have explained each line of the program to the right: When I executed the program below I entered Thomas Wynne's details and changed his address. ​ When I opened the employees file the address had been updated : 1: Importing os allows me to rename and remove files later in the program. ​ 3: Opens the employee file in read mode . ​ 5 - 8: Input lines allow the user to enter the first name, surname and the person's new address. ​ 10: A found flag is set up and set to False . ​ 12: The for loop cycles through each line in the file. ​ 13: Each line is split into separate parts from each / . ​ 15: An if statement checks if the first name and surname match an employee in the file. ​ 16: A replacement line is created by putting the original line together but with the new address. ​ 18: The found flag is changed to True because the employee first name and surname matched . ​ 19: A temporary file is created and opened in write mode . ​ 20: The seek command restarts the file at line 0 . ​ 22: The for loop cycles through each line of the employee file from the beginning. If the first name and surname match it will write the new line to the file, otherwise it will rewrite the original line . ​ 28 & 29: Both files are closed . ​ 31 & 32: If the names didn't match , an appropriate message is printed. ​ 34 - 37: If the address was changed, the original file is renamed and deleted and the temp file is renamed as the original file. Practice Task 4 Use the movie file you created for practice task 1. ​ Ask the user to enter the name of a movie. Ask them to enter an updated rating out of 10. ​ Update the file to change the rating to the new value. Example solution: ⬅ 10b - Read & Search Files Section 10 Practice Tasks ➡

  • OCR A-Level Component 2 | CSNewbs

    OCR Computer Science A-Level Component 2: Algorithms & Programming These pages are based on content from the OCR Computer Science 2015 specification . This website is in no way affiliated with OCR . 1. Computational Thinking 1.1 - Computational Thinking 2. Problem Solving & Programming 2.1a - Recursion & Variables 2.1b - Modularity & IDE 2.2a - Computational Methods 2.2b - Object-Oriented Programming 3. Algorithms 3.1a - Algorithm Design 3.1b - Big O Notation 3.1c - Data Structures: Stacks, Queues & Lists 3.1d - Data Structures: Trees & Graphs 3.1e - Sorting Algorithms 3.1f- Searching Algorithms 3.1g - Pathfinding

  • Python | 5d - Colorama | CSNewbs

    top Python 5d - COlorama What is Colorama? Colorama is a library that allows the colour of text to be changed. ​ Information about the library can be found on the Python Package Index (PyPi) website . Copyright of the library is held by Jonathan Hartley & Arnon Yaari. ​ Colorama can be imported when using some online editors like Replit . ​ Colorama is not available as a default library on the standard Python offline editor (IDLE) . Using Colorama The three main commands using Colorama are: ​ Fore to change the text colour. Back to change the highlight colour. Style to make the text appear dim or bright. from colorama import Fore print (Fore. GREEN + "Hello There" ) Hello There from colorama import Back print (Back.YELLOW + "Goodbye Now" ) Goodbye Now from colorama import Style print (Style.DIM + "Hi Again" ) Hi Again There are 8 possible colours to choose with the Fore and Back commands. You must write the colour name in CAPITAL LETTERS . ​ BLACK CYAN GREEN MAGENTA RED WHITE YELLOW There is also the RESET option, e.g. Fore.RESET The 2 options to choose with the Style command are DIM and BRIGHT . You can also use Style.RESET_ALL Colorama Task 1 ( Traffic Lights) Create a simple traffic light program . ​ The user is prompted for an input . Typing "GO " will output a suitable message in GREEN , typing "WAIT " will output a message in YELLOW and typing "STOP " will output a response in RED . Example solutions: What should the driver do? STOP You must stop your car. What should the driver do? GO It is safe to continue driving. ⬅ 5c - Date & Tim e 5e - M ore Libraries ➡

  • Greenfoot | Key Code | CSNewbs

    Greenfoot Code Glossary Greenfoot Home This code will work for Version 2.4.2 which is used in Component 2 of the 2016 WJEC/Edquas specification . Key Down 270 if (Greenfoot.isKeyDown("right" )) { setRotation(0); move(1); } 180 90 0 Bounce At Edge if (isAtEdge()) { turn(180); } move(1); if (Greenfoot.getRandomNumber(10)<1) { turn(Greenfoot.getRandomNumber(90) - 45); } Random Remove Object if (isTouching(Apple.class )) { removeTouching(Apple.class ); } Play Sound Greenfoot.playSound("pop.wav" ); Stop Greenfoot.stop(); Counter - (Write this code when an object is removed) Counter counter = (Counter) getWorld().getObjects(Counter.class ).get(0); counter.add(1); 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.

  • HTML | CSNewbs

    I'm Arthur the Alligator and I'm here to teach you HTML. HTML GUide Show me how to make a webpage in HTML from scratch. List of Tags Show me a list of tags I can use.

  • 1.5 - Performance - Eduqas GCSE (2020 spec) | CSNewbs

    1.5: Performance Exam Board: Eduqas / WJEC Specification: 2020 + The performance of a computer system is affected by three main factors: Cache Memory: Size & Levels What is cache memory? ​ Cache memory is temporary storage for frequently accessed data . ​ Cache memory is very quick to access because it is closer to the CPU than other types of memory like RAM . What are the 3 levels of cache memory? Level 1 cache is the smallest level but it is also the fastest . Level 2 cache is larger than level 1 but slightly slower. Level 3 cache is located outside of the CPU core which makes it slower than the first two levels but it is much larger . How does cache memory work? ​ When the CPU searches for data , it looks first in level 1 cache, then level 2 and then level 3 . If the data has been found , this is called a 'cache hit '. If the data is not found then the CPU searches in RAM instead which takes more time - this is called a 'cache miss '. How does cache memory improve performance? Cache memory is closer to the CPU than RAM , meaning that it can provide data and instructions to the CPU at a faster rate . ​ A computer with more cache memory (e.g. 8MB instead of 4MB) should have a higher performance because repeatedly used instructions can be stored and accessed faster . ​ Larger level 1 and level 2 cache sizes will improve a computer's performance as data can be accessed extremely quickly . What is the limitation of cache memory? Cache memory is costly, so most computers only have a small amount . ​ Multiple cache misses will result in data latency (delay) as information is accessed from RAM which is further away from the CPU. Clock Speed What is clock speed? Clock speed is the measure of how quickly a CPU can process instructions . ​ Clock speed is measured in Gigahertz (GHz) . A typical desktop computer might have a clock speed of 3.5 GHz . This means it can perform 3.5 billion cycles a second . How does clock speed improve performance? ​ The faster the clock speed, the faster the computer can perform the FDE cycle resulting in better performance because more instructions can be processed each second . How does overclocking and underclocking affect performance? Typical clock speed: 3.5 GHz Underclocking Overclocking 3.9 GHz 3.1 GHz Overclocking is when the computer's clock speed is increased higher than the recommended rate. ​ This will make the computer perform faster, but it can lead to overheating and could damage the machine . Underclocking is when the computer's clock speed is decreased lower than the recommended rate. ​ This will make the computer perform slower but will increase the lifespan of the machine . Number of Cores What is a core? ​ A core is a complete set of CPU components (control unit, ALU and registers). Each core is able to perform its own FDE cycle . ​ A multi-core CPU has more than one set of components within the same CPU. How does the number of cores improve performance? ​ In theory, a single-core processor can execute one instruction at a time , a dual-core processor can execute two instructions, and a quad-core can execute four instructions simultaneously . ​ Therefore, a computer with more cores will have a higher performance because it can process more instructions at once . What are the limitations of having more cores? ​ If one core is waiting for another core to finish processing, performance may not increase at all. ​ Some software is not written to make use of multiple cores , so it will not run any quicker on a multi-core computer. Q uesto's Q uestions 1.5 - Performance: ​ Cache Size & Levels 1a. What is cache memory ? [ 2 ] 1b. Describe the three levels of cache memory . [ 3 ] 1c. Describe what is meant by a ' cache hit ' and a ' cache miss '. [ 2 ] 1d. Describe two ways that more c ache memory will mean performance is higher . [ 4 ] 1e. Explain why most computers only have a small amount of cache memory. [ 1 ] Clock Speed 2a. What is clock speed ? What is it measured in? [ 2 ] 2b. Explain how a higher clock speed improves performance . [ 2 ] 2c. Explain the terms 'overclocking ' and 'underclocking ' and explain the effects of both on the performance of a computer. [ 4 ] ​ Number of Cores 3a. What is a core ? [ 2 ] 3b. Explain why a quad-core processor should have a higher performance than a dual-core processor . [ 3 ] 3c. Explain two reasons why having more cores doesn't necessarily mean the performance will be better . [ 2 ] 1.4 - Secondary Storage 1.6 - Additional Hardware Theory Topics

  • 4.1e - Shifts & Masks | OCR A-Level | CSNewbs

    Exam Board: OCR 4.1e - Shifts & Masks Specification: A-Level 2015 An instruction set is a list of all the instructions that a CPU can process as part of the FDE cycle . ​ CPUs can have different sets of instructions that they can perform based on their function. The two most common instruction sets are the simpler RISC (Reduced Instruction Set Computer ) and more complicated CISC (Complex Instruction Set Computer ). Instruction Sets This page is still being updated. Graphical Processing Unit What is cache memory? ​ Cache memory is temporary storage for frequently accessed data . ​ Cache memory is very quick to access because it is closer to the CPU than other types of memory like RAM . Multicore & Parallel Systems What is cache memory? ​ Cache memory is temporary storage for frequently accessed data . ​ Cache memory is very quick to access because it is closer to the CPU than other types of memory like RAM . Multicore & Parallel Systems What is cache memory? ​ Cache memory is temporary storage for frequently accessed data . ​ Cache memory is very quick to access because it is closer to the CPU than other types of memory like RAM . Q uesto's Q uestions 4.1e - Shifts & Masks: ​ 1. What is cache memory ? [ 2 ] ​ 4.1d - Binary Calculations Theory Topics 4.2 - Data Structures

  • Greenfoot Guide #6 | Counter | CSNewbs

    6. The Counter Greenfoot Tutorial 1. Import the Counter The counter class can be imported into your Greenfoot world. ​ Select Edit in the main Greenfoot window then ' Import Class... ' and choose Counter . Watch on YouTube: The Counter class will appear in the Actor classes list . Right-click on the Counter, choose the ' new Counter() ' option and drag it into the world. ​ Now right-click on the background and select 'Save the World' once you have dragged the counter into the world. 2. Increase the Counter by 1 Two lines of code are required to increase the counter . ​ Add this code when your main character is removing the collectible object . This code allows your main character to access the 'add' method from the Counter class . ​ The method 'add ' just increases the value of the counter by the number in the brackets . ​ To decrease the counter , type a negative value in the brackets, such as -1 . < Part 5 - Play Sounds 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 counter increases . Click on me if you've got an error that you're stuck with. Part 7 - Extension Ideas >

  • Old Eduqas Topics (2016 Spec) | CSNewbs

    Topics from the 2016 Eduqas Specification This page contains information from the 2016 Eduqas specification that was removed for the 2020 specification. ​Quick Links: ​ Buses & Instruction Sets (RISC & CISC) Protocols (IMAP & POP3) Network Devices (Gateway) Human-Computer Interaction (Command-Line Interface, Touch-Sensitive Interface, Menu-Driven Interface, Voice-Driven Interface) Cyber Attacks (Dictionary Attack, Buffer Overflow, Human Weakness) Software Protection (Secure by Design, Too Many Permissions, Scripting Restrictions, Validation with Parameters) Data Policies (Acceptable Use Policy, Disaster Recovery, Cookies) Environmental Issues (Tips to Reduce Waste, Positive Impacts of Technology) Object Oriented Programming (Greenfoot and Java) Programming Topics (Assembly Language, HTML, Greenfoot) Buses Buses & Instruction Sets Buses Data is transferred within a computer system along pathways called buses . ​ There are three types of bus: Address Bus Data Bus Control Bus Sends a memory address of where data is stored.​​ The address is sent from the CPU to RAM in the FDE cycle. Transfers data between components. Data is sent both ways . Sends control signals from the control unit to other components of the system. Status signals are sent back to the CPU. An instruction set is a list of all the instructions that a CPU can process as part of the FDE cycle . ​ CPUs can have different sets of instructions that they can perform based on their function. The two most common instruction sets are the simpler RISC (Reduced Instruction Set Computer ) and more complicated CISC (Complex Instruction Set Computer ). Instruction Sets Reduced Instruction Set Computer (RISC) Complex Instruction Set Computer (CISC) Complexity RISC has fewer instructions than CISC and is therefore slower for carrying out complex commands but quick for basic tasks . CISC has more complex instructions available and can therefore perform complicated tasks . Cost RISC is generally cheaper to mass produce because less circuitry is required for the smaller instruction set. CISC CPUs are generally more expensive because they require more circuitry to operate. Power RISC CPUs are designed to use less power and run without dedicated cooling systems (like fans) so that they can be used in devices like smartphones . Because CISC CPUs require more circuitry this means that they generate more heat and may require a fan . CISC CPUs therefore are commonly used in desktop computers . Clock Speed RISC CPUs run at lower clock speeds than CISC CPUs. They can perform simpler tasks more quickly than CISC, but are generally not used to carry out complex instructions . CISC CPUs run at higher clock speeds than RISC CPUs. They can perform complex tasks more quickly than RISC. Protocols Protocols POP3 ( Post Office Protocol 3 ) and IMAP (Internet Message Access Protocol ) are both protocols for receiving and storing emails from a mail server. Gateway Network Devices Gateway A gateway joins together two networks that use different base protocols . For example, a gateway could link together a LAN to a WAN . HCI Human - Computer Interaction Command-Line Interface Touch-Sensitive Interface Other types of user interface do exist, such as a command-line interface (CLI ). This type of interface is entirely text-based and requires users to interact with the system by typing commands . This is a complicated process and mistakes could easily accidentally delete data. There are many commands to learn so only experts who have been trained t o learn this interface will be able to efficiently make use of it. Another type of user interface is a touch-sensitive interface , used with smartphones and tablets . ​ A human interacts with the device by pressing on a touchscreen , making it very intuitive and suitable for most users without training. Touch-sensitive interfaces may not work with dirty or wet fingers and it will take longer to write text compared to using a keyboard. Menu-Driven Interface A menu-driven interface displays data in a series of linked menus . Examples include cash machines (ATMs) and old iPods . ​ This type of interface is generally user friendly and easy to use as commands do not need to be memorised. However it can be annoying to find specific data through a large number of menus without a search feature. Voice-Driven Interface A voice-driven interface can be controlled by speaking commands aloud to a listening device. Examples include Amazon's Alexa devices, Apple's Siri technology and Google Home . ​ This interface is intuitive , can be used hands-free and helps to speed up processes . However commands may be misheard or limited in what can be performed. Cyber Attacks Cyber Attacks Dictionary Password Attack This uses a file containing every word in the dictionary and cycles through them all. This method is relatively easy to program but will only break the simplest passwords . Buffer Overflow Attack A buffer is a temporary storage location . ​ A buffer overflow attack causes a program to try to store more data in a buffer than it can hold which can lead to adjacent memory locations being overwritten . An attacker can use the buffer overflow to insert malicious code to change data or steal confidential data . Human Weakness The biggest weakness in online security is often not the systems in place but carelessness or mistakes made by humans . Social engineering means to trick others into revealing their personal data by posing as a trusted source . For example, impersonating an IT technician via email and asking to send a username and password. Humans can accidentally compromise data by downloading malicious files or being unsafe online, like using the same password for multiple different accounts. Attackers can access unauthorised information in person by shoulder surfing and watching them as they enter sensitive data such as a PIN or password. Software Protection Software Protection The following methods of protection are considered in the design, testing and creation stages of developing software . Secure by Design This method puts security as the most important concept when creating and designing software . ​ By focusing on security when designing software there should be less need for later updates and patches and attacks are less likely to succeed . Too Many Permissions Apps require permission to use device features (such as the camera or microphone of a smartphone) when they are downloaded. Programmers should only request permission for features that the software requires . ​ Some malicious apps steal data or spy on users - and the worst part is that you've given permission for it to do it! Users can avoid suspicious apps by reading reviews, checking there are no unnecessary permission requests , only downloading the software you need / will use and uninstall apps if permissions change . Scripting Restrictions A script is a set of instructions executed on a website. For example, Facebook uses a JavaScript script to post a status and another to read your private messages. ​ The Same Origin Policy (SOP) is a security precaution that prevents websites from using scripts on other sites that you have open . For example, if you are using JavaScript to post a status on Facebook then visit an infected site, that site can't also use JavaScript to access your Facebook data, because even though they both use JavaScript, they are from a different origin . Without SOP an infected website could access personal data or infect a computer with malware by maliciously using the same scripts as other websites you have used . Programmers should set scripting restrictions when creating websites. Validation with Parameters A parameter is a measure that is used when validating data , it is usually a range or limit. For example, the parameters of a length check may be whether the data is between 1 and 10 characters . ​ Programmers must ensure validation is used on websites with suitable parameters to prevent attacks such as an SQL injection. Data Policies Data Policies Data policies are written documents that clearly define how data should be managed in an organisation. It is important that all employees stick to these policies and requirements so that data is kept safe and can be replaced if lost or corrupted. The following methods are examples of common data policies. Acceptable Use Policy (AUP) Workplaces and schools often require people to sign an acceptable use policy (AUP) before being allowed to use the network. It is a list of rules and expected behaviour that users must follow when using the computer systems. Typical rules include: Which websites are off-limits (such as social media or gambling sites), Download permissions (such as who can download and install software) Email communication (such as appropriate language). Punishments if rules of the AUP are broken. ​ The AUP is sometimes known as a Code of Conduct . This is an example of a formal code of practice , with written rules and clear expectations . An informal code of practice would not be officially written down , such as personal habits and preferences (e.g. email layout or desk organisation). Disaster Recovery With important data often stored on a computer network, it is absolutely vital that a detailed and effective disaster recovery policy is in place in the event of data being lost due to an unexpected disaster. ​ Disasters include natural disasters (e.g. fire, flood, lightning), hardware failure (e.g. power supply unit failing), software failure (e.g. virus damage) and malicious damage (e.g. hacking). ​ ​ There are three clear parts to a disaster recovery policy:​​ ​ Before the disaster: All of the possible risks should be analysed to spot if there are any weaknesses in preparation. Preventative measures should be taken after the analysis, such as making rooms flood-proof or storing important data at a different location . Staff training should take place to inform employees what should happen in the event of a disaster. During the disaster: The staff response is very important – employees should follow their training and ensure that data is protected and appropriate measures are put in place. Contingency plans should be implemented while the disaster is taking place, such as uploading recent data to cloud storage or securing backups in a safe room and using alternative equipment until the disaster is over. After the disaster: Recovery measures should be followed, such as using backups to repopulate computer systems. Replacement hardware needs to be purchased for equipment that is corrupted or destroyed. Software needs to be reinstalled on the new hardware. Disaster recovery policies should also be updated and improved . Cookies A cookie is a small piece of data that is stored by websites when you visit them. They allow the website to identify the user and are often used to speed up processes , such as: Automatic login (by saving account details) Save items into a basket (such as pizza delivery sites) Display adverts related to your previous search terms . Although they can be used to save time, some argue that cookies can be intrusive and store too much information. Environmental Issues Environmental Issues Tips to Reduce Waste Turn off computers , monitors and other connected devices when not in use . Adjust power options to help minimise power consumption.​ ​Devices with the Energy Star sticker use between 30% and 70% less electricity than usual. Repair older devices rather than throwing them away. Ink jet printers use up to 95% less energy than laser jets.​​ Think twice about printing paper, don't waste ink and remember to recycle paper . Positive Environmental Impacts Communication advancements (such as video messengers) reduces pollution as people do not have to travel to speak to each other. This is especially beneficial in business - workers can talk from the office and do not need to catch a plane to speak. Smart devices can monitor usage and reduce energy waste - such as smart air conditioners and home security systems. Collaboration software (such as cloud-based technology and Google Docs) allows experts to work together and share data. The internet and research databases allows scientists to study the environment more efficiently. Documents can be viewed on a screen rather than printed out - books and newspaper articles can be read on kindles / tablets saving paper and ink . New materials and more environmentally-friendly processes have been developed thanks to increased technology and research. Object Oriented Programming Object-Oriented Programming (OOP) Java is an example of object-oriented programming (OOP) where a programmer is able to code objects that can be visually placed onto a background. Greenfoot is an IDE for Java . Superclass A class from which other 'subclasses' will inherit characteristics ; e.g. hippos, crocodiles and polar bears will inherit properties from the Animals superclass. Object A single object from a class ; e.g. one crocodile object from the Crocodile class. Class A set of objects which share the same properties ; e.g. all PolarBears will behave in a similar way. Comment Two / symbols will allow you to write a comment to explain the code . Method A series of instructions that an object will follow . The act() method will loop in Greenfoot when the play button is pressed. Programming Programming Topics Variable Scope & Lifetime The scope of a variable refers to the parts of the program where the variable can be viewed and used , e.g. a variable with global scope can be accessed anywhere in the program . The lifetime of a variable is the amount of time the variable is stored in memory and therefore can be used , e.g. local variables can only be accessed throughout the subroutine they are created in. Programming Languages: Assembly Language HTML Greenfoot Theory Topics

  • Python | Extended Task 5 | CSNewbs

    Extended Task 5 Collection of Colours A new paint company , 'Sparkle and Shine Paint Schemes ' needs a program that can manage the different colours they sell to customers. They currently have a file with many different colours and want a program made with features to add, remove and list the different colours . For this task, you will need to create a document and include the following sections (with screenshots where appropriate): ​ An introduction to explain the Purpose of your program . A List of Requirements for a successful program. Screenshots of your code (with comments in your code to show understanding). Testing – Create a plan to show how you will test your program and then explanations of any errors that you found and how they were fixed . An Evaluation of what worked, what didn’t, and how you met each of your requirements from your original list. Also, discuss further improvements that you could have made to improve your program. Reminders for this task: You will need to create a selection of options for the user to choose from. Subroutines and a while true loop may help. Section 10 will help you to open, write and read from files . Section 10c shows how to remove lines from a file. There are multiple ways to approach this program, and your solution might look different from the example. Break the problem down and focus on one part at a time. Example solution: Use a menu to select the different options using a command word. Download the colours file: Selecting Total will list the number of colours in the file. This should change whenever a new colour is added or one is removed . Selecting Add will allow the user to enter the name of a new colour to be added to the file . Selecting Letter will allow the user to enter a letter . ​ All colours beginning with that letter should be displayed . Selecting Remove will allow the user to enter a colour to be removed from the file . Selecting Random will display a random colour from the file. Selecting End will stop the program. ⬅ Extended Task 4 (Vet Surgery) Extended Task 6 (Word Game) ➡

  • 4.4 - Arithmetic Shift - Eduqas GCSE (2020 Spec) | CSNewbs

    4.4: Arithmetic Shift Exam Board: Eduqas / WJEC Specification: 2020 + What is arithmetic shift? Arithmetic shift is used to multiply and divide binary numbers . The effect of shifting left is to multiply a binary number. The effect is doubled by each place that is shifted . x The effect of shifting right is to divide a binary number. ÷ Shifting by 1 has an effect of 2 . ​ Shifting by 2 has an effect of 4 . ​ Shifting by 3 has an effect of 8 . For example, shifting left by 2 places has an effect of multiplying by 4 . Another example: Shifting right by 3 places has an effect of diving by 8 . How to shift a binary number: An exam question may ask you to arithmetically shift a binary number of up to 16 digits . Q uesto's Q uestions 4.4 - Arithmetic Shift: ​ 1a. Draw a diagram to show the effect of multiplying and dividing a binary number . [2 ] 1b. Draw a diagram or table to show the effect a shift has for each place from 1 to 4 . For example, a shift of 1 place has an effect of 2. [4 ] ​ 2. State the effect of the following shifts: a. Shift right by 2 places. b. Shift left by 1 place. c. Shift left 3 places. d. Shift right by 4 places. [ 1 each ] ​ 3. Shift the following binary numbers and state the effect of the shift: a. 10101011 : Shift left by 2 places. b. 11101100 : Shift right by 3 place. c. 00001011 : Shift right by 2 places. d. 01101110 : Shift left by 1 place. [ 2 each ] Watch on YouTube 4.3 Binary Calculations Theory Topics 4.5 - Character Sets & Data Types

bottom of page