Search CSNewbs
290 results found with an empty search
- 3.1b - Hardware & Internet - OCR GCSE (J277 Spec) | CSNewbs
Learn about network devices such as a switch, router, modem and NIC. Also learn about internet terms and services including DNS and the Cloud. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). 3.1b: Network Hardware + The Internet Exam Board: OCR Specification: J277 Watch on YouTube : The Internet Network Hardware DNS Servers The Cloud Network Devices When sending data across a network, files are broken down into smaller parts called data packets . Whole files are too large to transfer as one unit so data packets allow data to be transferred across a network quickly . Each packet of data is redirected by routers across networks until it arrives at its destination. Data packets may split up and use alternative routes to reach the destination address. When all the packets have arrived at the destination address the data is reassembled back into the original file. Wireless Access Point A Wireless Access Point provides a link between wireless and wired networks . It creates a wireless local area network that allows WiFi-enabled devices to connect to a wired network. Examples of a wireless access point in a public space could be a WiFi or Bluetooth hotspot , for example a WiFi hotspot in a coffee shop or airport to provide access to the internet. A wireless access point may be a separate device or built into another device such as a router. Router Routers are used to transfer data packets between networks . Routers receive data packets and use the IP address in the packet header to determine the best route to transmit the data. Data is transferred from router to router across the internet towards the destination. A router stores the IP address of each computer connected to it on the network and uses a list called a routing table to calculate the quickest and shortest route to transfer data. Switch A switch is used to connect devices together on a LAN . It receives data packets from a connected node, reads the destination address in the packet header and forwards the data directly to its destination. A switch will generate a list of the MAC addresses of all devices connected to it when it receives data , and must scan for a matching destination address before sending. An alternative to a switch is a hub but a hub is slower and less secure as it forwards a copy of received data to all connected nodes . Network Interface Controller / Card A Network Interface Controller (NIC ) commonly also known as a Network Interface Card is an internal piece of hardware that is required for the computer to connect to a network . The card includes a MAC address which is used when sending data across a LAN . An ethernet cable is plugged into the network card to allow data to be exchanged between the device and a network. A NIC used to be a separate expansion card but is now typically embedded on the motherboar d . Transmission Media Although not technically a device, the communication channel along which data is transferred will affect performance . Three common types of transmission media include: Ethernet cables - used typically on a LAN to transfer data between nodes and hardware such as switches. Examples include Cat5e and Cat6. Fibre Optic cables - very fast but more expensive and fragile cables typically used to send data quickly along a WAN . Data is sent as pulses of light . Coaxial cables - older , slower , copper cables that are not used as much in modern times as they can be affected by electromagnetic interference . The Internet The internet is a global network of interconnected networks . The world wide web (WWW ) is not the same as the internet. It is a way of accessing information , using protocols such as HTTPS to view web pages . Servers provide services on the internet , such as a web server which responds to the web browser (client) request to display a web page . The web server processes the client request to prepare the web page and return it so the web browser can display it to the user . A website must be hosted (stored) on a web server so that it can be accessed by others using the internet . A unique domain name (e.g. csnewbs.com) must be registered with a domain registrar – this is a company that checks the name is valid and not already taken . What is the Internet? DNS Servers A DNS ( Domain Name System ) server stores a list of domain names and a list of corresponding IP addresses where the website is stored. The first thing to understand is that every web page has a domain name that is easy for humans to remember and type in (such as www.csnewbs.com ) as well as a related IP address (such as 65.14.202.32) which is a unique address for the device that the web page is stored on. The steps taken to display a web page: 1. A domain name is typed into the address bar of a browser . 2. A query is sent to the local DNS server for the corresponding IP address of the domain name . www.facebook.com 3. The local DNS server will check if it holds an IP address corresponding to that domain name. If it does it passes the IP address to your browser . 66.220.144.0 4. The browser then connects to the IP address of the server and accesses the web site . If the local DNS server does not hold the IP address then the query is passed to another DNS server at a higher level until the IP address is resolved. If the IP address is found, the address is passed on to DNS servers lower in the hierarchy until it is passed to your local DNS server and then to your browser. Cloud Storage The cloud refers to networks of servers accessed on the internet . Cloud computing is an example of remote service provision . Cloud servers can have different purposes such as running applications , remote processing and storing data . When you store data in 'the cloud', using services such as Google Drive or Dropbox, your data is stored on large servers owned by the hosting company . The hosting company (such as Google) is responsible for keeping the servers running and making your data accessible on the internet . Cloud storage is very convenient as it allows people to work on a file at the same time and it can be accessed from different devices. However, if the internet connection fails , or the servers are attacked then the data could become inaccessible . Cloud Storage Characteristics: ✓ - Huge CAPACITY and you can upgrade your subscription if you need more storage. ✓ / X - Cloud storage is difficult to rank in terms of PORTABILITY , DURABILITY and ACCESS SPEED because it depends on your internet connection. A fast connection would mean that cloud storage is very portable (can be accessed on a smartphone or tablet) but a poor connection would make access difficult . ✓ - Cloud storage is typically free for a certain amount of storage. Users can then buy a subscription to cover their needs - Dropbox allows 2 GB for free or 2 TB for £9.99 a month. Q uesto's Q uestions 3.1b - Network Hardware & Internet: 1a. Explain how a switch works. [ 2 ] 1b. Describe the purpose of a router . [ 2 ] 1c. State what WAP stands for and why it is used . [ 2 ] 1d. State what NIC stands for and why it is required . [ 2 ] 1e. State the differences between the three main types of transmission media . [ 3 ] 2a. State what the internet is and how it is different to the world wide web . [ 2 ] 2b. What is web hosting ? [ 2 ] 3a. What is a DNS server ? [ 2 ] 3b. Describe, using a mix of text and icons / images , how a DNS server is used to display a web page . [5 ] 3c. Describe how a DNS server searches for an IP address if it is not found on the local DNS server . [ 2 ] 4a. Describe what cloud computing is. [ 2 ] 4b. State two advantages and two disadvantages of the cloud . [ 4 ] 3.1a - Network Types & Performance Theory Topics 3.2a - Wired & Wireless Networks
- OCR CTech IT | Unit 1 | 1.6 - Hardware Troubleshooting | CSNewbs
Learn about troubleshooting tests and information to record when a hardware error occurs. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification. 1.6 - Hardware Troubleshooting Exam Board: OCR Specification: 2016 - Unit 1 What is troubleshooting? Troubleshooting means to analyse and solve a problem with a computer system. Hardware troubleshooting refers to fixing an issue with the physical parts of the computer or any connected devices. Hardware issues might occur as a result of damage (intentional or accidental), power surges or malware . Steps to Take When an Error Occurs Try to identify the problem by looking for the simplest explanation first (e.g. checking the power supply) and ask the user questions about the issue. Create a theory about what the cause of the problem could be and prepare to test the theory using a series of troubleshooting tests . Create a troubleshooting plan and record the steps that are taken before moving on to the next test. Check the system works after each stage of the plan. Create a findings document that explains if and how the problem was fixed, for future reference if the problem occurs again. Documentation Technicians and help desk (see 3.5 ) staff should document , on a fault sheet , the following information regarding the issue: The fault itself (such as 'system not turning on'). The system in question. The user logged in at the time. Exact date & time the problem occurred. Symptoms of the issue (such as 'slow load times' or 'beeping'). Problem history - checking if it has happened to this system before. Back up documentation - Whether the data been backed up recently. Troubleshooting Tools The following tools can be used to identify an error so a technician has a greater understanding of the problem. Event Viewer Event Viewer is a type of utility software that lists detailed information about an error when one occurs. It can be used to work out how to fix the issue and will display both minor and major faults. Power On Self Test (POST) On start-up, a power on self test (POST) checks memory, power, hardware and cooling systems are all working properly. Beep codes signal if an error has been detected; 1 beep will sound for no error but if multiple beeps are heard then an error has been discovered. Ping Test This is a connectivity test between two computers. A message is sent to the destination computer and waits for a return message named the echo reply . This procedure can be repeated with other systems until the source of the problem is identified from a computer that does not reply . Q uesto's Q uestions 1.6 - Hardware Troubleshooting: 1. Summarise the 'Steps to Take when an Error Occurs ' section into your own top three tips for what to do when a hardware error happens . [3 ] 2. List 6 pieces of information that an IT technician should record when a hardware error has occurred . [6 ] 3. Briefly explain the purpose of three troubleshooting tools . [6 ] 1.5 - Communication Hardware 1.7 - Units of Measurement Topic List
- 3.2 & 3.3 - Information Categories | Unit 2 | OCR Cambridge Technicals | CSNewbs
Learn about how information can be categorised for both individuals and organisations. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification for Unit 2 (Global Information). 3.2 & 3.3 - Information Categories Exam Board: OCR Specification: 2016 - Unit 2 Categories of Information for Individuals Communication Texting a friend about dinner plans, sending an email to a family member in another country, ringing work because trains are delayed. Education and Training Revision textbooks, logging into a virtual learning environment to upload a completed worksheet, hand-written feedback sheets from a teacher after an exam. Planning Using a shared document to arrange meeting dates, using a webpage hosting a bus timetable, a calendar app. Financial Using a bank statement to plan holiday saving, creating a spreadsheet of expenditure this month, logging in to a secure web page to buy a present online. Entertainment Reading a film review in a magazine, listening to a podcast about trains, watching a tutorial on DIY. Research Using online encyclopedias for a school project, searching for research articles to write an essay, using a recipe book Location Dependent Find local pizza restaurants, searching for emergency dental care on holiday, Pokemon GO Categories of Information for Organisations Knowledge Management & Creation Managing information across an organisation e.g. sharing information between branches in different cities. Management Information Systems (MIS) A system that provides an overview of key information e.g. the location and contact details of each charity worker in a disaster area. A decision can be made on overall figures or individual data as appropriate. Financial Analysis & Modelling Analysing trends e.g. determining the top selling products in a year or weekly cash flow, to create models of customer/user behaviour. Contact Management Managing contact between a business and the customer e.g. tracking appointments at a doctor’s surgery. Internal and External Communication Providing a communication medium to staff and/or customers e.g. posting Christmas opening times on the website, or sending a staff email invite to the Christmas party. Big Data Any data too large or complex for traditional data analysis techniques to be used e.g health data on the population of an entire country. Marketing, Promotion & Sales Identifying patterns or trends in sales figures, so that certain products or areas can be targeted, e.g. to plan marketing campaigns. Decision Making Using available information to make decisions, e.g. a charity deciding on the amount of aid to be sent to a disaster area based on local data. Q uesto's Q uestions 3.2 & 3.3 - Information Categories: 1. Describe two examples of each category of information used by individuals : Communication Education & Training Entertainment Planning Financial Research Location Dependent [2 each ] 2. Describe two examples of each category of information used by organisations : Knowledge Management & Creation Management Information Systems (MIS) Marketing, Promotion & Sales Financial Analysis & Modelling Contact Management Decision Making Internal & External Communication Big Data [2 each ] 3.1 - Data vs. Information Topic List 3.4 - Stages of Data Analysis
- 1.3 - Primary Storage - Eduqas GCSE (2020 spec) | CSNewbs
Learn about the five types of primary storage - RAM, ROM, cache, flash and virtual memory. Based on the 2020 Eduqas (WJEC) GCSE specification. 1.3: Primary Storage (Memory) Exam Board: Eduqas / WJEC Specification: 2020 + Storage in a computer system is split into two categories. Primary Storage: Very quick to access because it is attached to the motherboard . Typically smaller in storage size . Sometimes called ‘main memory’ . Secondary Storage: Slower to access because it is not directly embedded on the motherboard . Typically larger in storage size . Sometimes called ‘backing storage’ . Storage is also split into two types - volatile and non-volatile . Volatile storage is temporary - data is lost whenever the power is turned off . Example: RAM Non-volatile storage saves the data even when not being powered . Data can be stored long-term and accessed when the computer is switched on . Example: ROM Types of Primary Storage (Memory) Random Access Memory (RAM) RAM is volatile (temporary) storage that stores all programs that are currently running . RAM also stores parts of the operating system to be accessed by the CPU. RAM is made up of a large number of storage locations, each can be identified by a unique address . Read-Only Memory (ROM) Cache Memory ROM is non-volatile storage that cannot be changed . ROM stores the boot program / BIOS for when the computer is switched on. The BIOS then loads up the operating system to take over managing the computer. Cache memory is volatile (temporary) storage that stores data that is frequently accessed . It is very quick to access because it is closer to the CPU than other types of memory like RAM. The three levels of cache memory are explained in more detail in 1.5 . RAM ( R andom A ccess M emory) ROM ( R ead O nly M emory) Cache Memory Flash Memory Flash memory is editable so it can be read and written to . It is also non-volatile so it can be used for long-term data storage even when the system is not powered on. Flash memory is also used for secondary storage devices like USB sticks and solid-state drives - see 1.4 . Virtual Memory When a computer system is running slowly and RAM is near full capacity , the operating system will convert storage space on the drive into temporary memory . This virtual memory slows the system down because it takes longer to access the drive than it does to manage RAM. Transferring data between RAM and virtual memory is called paging . Q uesto's Q uestions 1.3 - Primary Storage (Memory): 1. Describe the differences between primary and secondary storage . This could be done in a table with the column headings 'access speed' , 'storage size' and 'also known as' . [ 6 ] 2. Explain the difference between volatile and non-volatile storage . State an example of both types. [ 4 ] 3. For each type of memory below, describe it and state what information is stored within it: a . Random Access Memory (RAM) [3 ] b. Read-Only Memory (ROM) [ 3 ] c. Cache memory [ 3 ] d. Flash memory [ 3 ] e. Virtual memory [ 3 ] 1.2 - FDE Cycle 1.4 - Secondary Storage Theory Topics
- HTML Guide 2 - Essential Tags | CSNewbs
Learn what a tag is in HTML and which ones are necessary to format a webpage ready for text and other content. 2. Creating Essential Tags HTML Guide Watch on YouTube: What is a tag ? HTML uses tags to define the content of a webpage . A tag uses angle brackets - they look just like my teeth... Some examples of tags are and and Most tags have a start tag and an end tag . The actual content is written in between the tags . For example : The p tag is used to write a paragraph Notice that the end tag uses a forward slash . < > Essential Tags There are three tags that are essential for every HTML web page : - This tag declares the start and the end of your html web page. - The head is the part of the web page that the user will not see. - The body holds all of the content of the web page (text, images, video etc.) Don't forget to use backslash for the end tags : / Use the image on the right to add the three essential tags (and their end tags) to your document. Now it is time to add something we can actually see! Text tags are up next. 1. Setup HTML Guide 3. Text Tags
- App Inventor 2 | Variables | CSNewbs
Learn how to use App Inventor 2 to create simple programs. Try to complete tasks 4, 5 and 6 on this page. Perfect for Key Stage 3 students to experiment with block coding, objects and properties. App Inventor Tasks 4, 5 & 6 - Using Variables This page will teach you how to make three simple apps that use variables . These apps will prepare you for the final program - the Pop-up Blob game. App #4 - Button Masher The first app to make is a simple program that counts how many times a button is pressed (but don't press it too much! ) This app will introduce you to using variables in App Inventor. Open App Inventor 2 (use the button below) and create a new project. You will need to log in with a Google account. App Inventor 2 Firstly, grab a button and two labels and place them in the Viewer . Using the Properties tab, you need to make the following changes: Button Text to 'Press Me!' Button Height to 60 pixels and Width to 'Fill parent...' Label 1 Text to 'Number of Presses' Label 2 Text to '0' Both Label 1 and Label 2 Width to 'Fill parent...' Both Label 1 and Label 2 TextAlignment to 'centre : 1' In the Components tab change the component names to be easier to code later. Switch to Blocks layout and drag an initialize global to block into the centre. In the blank space type 'Presses' - this is the name of the variable that will store how many times the button has been pressed. Drag a 0 block from Math. This will set the number of presses to 0 when the app starts. Drag a when ButtonPresses Clicked from the ButtonPresses section and add the necessary code inside. This code increases the variable value of Presses by 1 every time the button is clicked. It also changes the LabelPresses text to display the number of presses. Improve Your App As you will have seen in the video at the top, I programmed the app to go a bit crazy when 35 presses were recorded. In the code below I have shown how to use an if then block to check if the number of presses is 35. If it is then I have made the button invisible - this is an important feature we will use in later programs. Copy this code and add the following features to the then part of the if statement: Set the background colour to black. Change the Label1 Text Colour to white. Change the Label1 Text Size to 40. Change the Label1 Text to 'You broke it...' Program 4 Complete! App #5 - Timer The second app to make is a timer that counts up one second at a time. It also needs a reset button that sets the timer back to 0 again. It will introduce you to the clock component and enabling / disabling components. Open App Inventor 2 (use the button below) and create a new project. You will need to log in with a Google account. App Inventor 2 The code for this program is straightforward; it will take more effort getting the layout right. In the Palette tab, drag a HorizontalArrangement from the Layout section. It will look like an empty grey box at first. Grab a Button as well and place it underneath. Now drag two labels into the grey box and place the second one directly after the first, it may take a few attempts to get them to appear side by side like below: The last component to drag over is Clock (it is in the Sensors section in the Palette tab). It will go into its own section underneath: Change the name of some of the components so that they make more sense. Now to make some changes in the Properties tab. You should know enough by now to work out how to change your components so that it looks like this in your Viewer : Change your layout to Blocks and add the code blocks to the right. This code makes the Label named Seconds update by 1 every second, just like a timer. The code to the left will make the Label named Seconds reset to 0 when the button is pressed. Improve Your App As you will have seen in the video at the top of this task, I added a pause/unpause button that will set the enabled feature of the timer to true or false. You will need to complete the following steps (I've been deliberately vague to make it a challenge - break it down into small steps and use the colours to help you): Add a new button. Add code that, when the new button is clicked , checks if the TimerEnabled is true . If it is, then change TimerEnabled to false . Else change it to true . Now you also need to change the Text of the Button to read either "Pause" or "Unpause" . Program 5 Complete! App #6 - Windy Day The third app to make is an app that blows leaves around your screen. It will introduce you to random numbers, the canvas and coordinates . Open App Inventor 2 (use the button below) and create a new project. You will need to log in with a Google account. App Inventor 2 In the Palette tab, drag a Canvas from the Drawing and Animation section. A Canvas allows sprites (objects) to move around inside of it. In Properties , change the Height and Width of Canvas to 'Fill parent...' for both, so it fills the whole screen. In the Palette tab, drag over five ImageSprites from the Drawing and Animation section and drop them anywhere inside the canvas. Download the leaf picture with all App Inventor images on the basics page here . Upload the leaf image it in the Media tab. In the Components tab change the names of your ImageSprites to be leaf1, leaf 2 etc. For each leaf sprite, in the Properties tab, change the Picture to the leaf you just uploaded and change Height and Width to 30 pixels each. Finally, in the Palette tab, in the Sensors section, drag over a Clock . Your Viewer should look like the image to the left. X axis Y axis 0 300 500 Now for an explanation of coordinates. Each sprite (leaf) has an x coordinate (horizontal) and a y coordinate (vertical). For example, the leaf in the top right would have coordinates of x = 270 and y = 100. Can you work out approximately what the other leaves coordinates would be? What the code blocks below do is randomise the x and y coordinates for leaf1 every second. The word integer means a whole number . Use this code and add to it to make all 5 leaves randomly change coordinates. Improve Your App Add a pause / unpause button, just like in the Timer app that pauses the timer so that the leaves stop blowing (and starts them blowing around again too). Find a nice picture (maybe of a park?) online and upload it in the Media tab. Set this as the Canvas BackgroundImage . Add an audio file of some whooshing (why not record it yourself?). Program 6 Complete! Task 7 KS3 Home
- 2.3 - Quality of Information | Unit 2 | OCR Cambridge Technicals | CSNewbs
Learn about the characteristics of information and the impacts of both good and poor quality information on customers and stakeholders. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification for Unit 2 (Global Information). 2.3 - Quality of Information Exam Board: OCR Specification: 2016 - Unit 2 Information Characteristics Valid Information This is correct, up-to-date and complete information that fits its purpose . For example, detailed end-of-year financial data in the form of graphs. Biased Information 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. Relevant Information Information should be appropriate for the required purpose . Irrelevant information may get in the way of correct decision making. Accurate Information Information should be carefully selected and entirely correct , inaccurate information can lead to unwanted consequences such as higher costs and missed deadlines. Reliable Information Information from a source that can be verified and confirmed to be correct . For example, BBC News is a more reliable information source than social media posts. Information Quality The quality of information that an organisation uses will have a significant impact on further processes and decisions. Good quality information that is accurate , valid or reliable can lead to better strategic decisions , meeting deadlines and innovation . Poor quality information that is biased , inaccurate or out of date may lead to negative consequences such as loss of customer trust , fines and legal challenges . Positive Effects of Good Quality Information Reliable information received by the management team . Good quality research information. Good quality sales information. Accurate cost projection information. Informed decisions with a higher chance of success . Can lead to innovation and better understanding . Strategic decisions and planning ahead . Projects will stay within their budget . Accurate time expectations . Projects will be completed on time . Negative Effects of Poor Quality Information Biased survey with inaccurate results . Inaccurate stock information. Out of date information received by management . Inaccurate data has led to poor reviews online . Inaccurate time expectations . Misinformed decisions , not responding to customers needs . ??? Inaccurate delivery times , customers unhappy . Too much / little stock. Miss out on opportunities , possible fall in profits . Loss of customer trust , loss of customers and reputation . Financial issues . Projects take longer , cost more , stakeholders unhappy . Possible project failure . Q uesto's Q uestions 2.3 - Quality of Information: 1. Describe 5 characteristics of information . [10 ] 2. Explain 5 positive impacts of good quality information . [10 ] 3. Explain 5 negative impacts of poor quality information . [10 ] 2.2 - Information Classification 2.4 - Information Management Topic List
- Python | 4b - Mathematical Operators | CSNewbs
Learn how to use mathematical operators in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python 4b - Mathematical Operators Modulo Division The modulo operator - the percentage symbol % - will work out the remainder left over when one value is divided by another. print (30 % 6) = 0 30 ÷ 6 = 5, which is a whole number, so there is no remainder and 0 is output . print (30 % 7) = 2 30 ÷ 7 = 4 remainder 2 ; so the remainder is output . You can use modulo with variables too: num1 = 33 num2 = 4 print ( "The remainder is" , num1 % num2) The remainder is 1 = A common use of modulo is to check if a number is odd or even . If a number has no remainder when divided by 2 then it is even . = num = int ( input ( "Enter a number: " )) if num % 2 == 0: print (num, "is even." ) else : print (num , "is odd." ) Enter a number: 400 400 is even. Enter a number: 191 191 is odd. = Modulo Div i sion Task 1 ( Remainder) Ask the user to input a whole number . Use the modulo operator ( % ) to check if there is a remainder when the user's number is divided by 5 . Print the re mainder. Example solution: Enter a number: 123 The remainder when divided by 5 is 3 Modulo Div i sion Task 2 ( Rollercoaster) Use the odd/even program above to help solve this problem: A rollercoaster only lets people on in groups of 4 . Ask the user to input a number for how many people are in their group. Check if that number is directly divisible by 4 using modulo division ( % ). If it is then print “Perfect groups of four!” Else print “You will be split up” . Example solutions: Welcome to the Hyper Coaster! How many in your group? 6 You will be split up! Welcome to the Hyper Coaster! How many in your group? 12 Perfect groups of four! Integer Division Integer division removes any decimal numbers when performing division , leaving just the integer (whole number ). In Python integer division is performed using // . print (20 / 3) print (20 // 3) = 6.666666666666667 6 Integer Div i sion Task 1 ( Integer Division by 5 ) Use an input line with int to ask the user to enter a number . Use integer division ( // ) to divide the number by 5 without keeping any decimal values . Challenge: Improve your solution by altering the print line to be more user friendly . Example solutions: Enter a number: 27 5 Enter a number: 27 5 goes into 27 5 times. Integer Div i sion Task 2 ( Plane Rows) A large plane has 6 seats in each row. Input the number of passengers on the plane and use integer division to work out how many full rows will be filled. Example solution: How many passengers are there in total? 174 There will be 29 full rows on the plane. Exponent (Powers) An exponent is the number of times a value is multiplied by itself , for example 2 = 2 x 2 x 2 = 8 . The symbol to represent an exponent in Python is ** . For example: 4**2 represents 4 which is also 4 x 4 . 3 2 print (4**4) = 256 base = 5 exponent = 4 print (base**exponent) 625 = Exponent Task 1 ( Square Number) Use an input line with int to ask the user to enter a number . Output the square of this number. Example solution: Enter a number: 12 12 squared is 144 Exponent Task 2 ( Custom Exponent) Use an input line with int to ask the user to enter a number, this will be the base . Make another input line with int to ask for the exponent . Use ** between the base and the exponent and print it. Challenge: Make your solution better by including the base and exponent in the print line. Example solutions: Enter the base: 7 Enter the exponent: 3 343 Enter the base: 7 Enter the exponent: 3 7 to the power of 3 is 343 ⬅ 4a - If Statements 4 c - Log ical Operators ➡
- Searching & Sorting Algorithms - OCR GCSE (J277 Spec) | CSNewbs
Learn about searching algorithms such as linear and binary search. Also learn about sorting algorithms such as merge, bubble and insertion sorts. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). 1.3: Searching & Sorting Algorithms Exam Board: OCR Specification: J277 Watch on YouTube : Linear Search Binary Search Bubble Sort Merge Sort Insertion Sort Key features of a bubble sort: Uses an outer while loop (condition controlled ) to check no swaps have been made . Uses an inner for loop (count controlled ) to repeat through the length of the data set . Uses a flag (a Boolean value ) to track if a swap has been made and uses a temporary value to help correctly swap elements . Linear Search A linear search is the most simple search algorithm. Each data item is searched in order from the first value to the last as if they were all laid out in a line . The list does not have to be in any order before it is searched . This search is also known as a sequential search because the list is searched in a sequence from start to end. For large lists , this search is not very efficient . Binary Search A binary search is a much more efficient searching algorithm as it generally searches through fewer data and is often much quicker - especially for large data sets . In a binary search, the middle point of the data is selected with each iteration and compared to the value being searched for . When the midpoint matches the target value , it as been found and the search can stop. ! ! However there is a prerequisite of using a binary search - the list of data must already be sorted . A prerequisite is a condition that must be satisfied before an algorithm will work correctly . Merge Sort Merge sort is a sorting algorithm based on the idea of ‘divide and conquer ’. A merge sort divides a list into half , again and again until each data item is separate . Then the items are combined in the same way as they were divided , but now in the correct order . When the individual lists are all merged together as one list again, then the data is in order and the algorithm will end . Bubble Sort This algorithm is based on the comparison of adjacent data elements . Data elements are swapped if they are not in the correct order . The algorithm will only stop when a complete iteration through the data is completed with no swaps made . A bubble sort is not suitable for large sets of data . Insertion Sort The list is logically split into sorted values (on the left) and unsorted values (on the right). Starting from the left, values from the unsorted part are checked and inserted at the correct position in the sorted part. This continues through all elements of the list until the last item is reached, and sorted. Insertion sorts are efficient for small data sets but would be slow to sort large sets , compared to alternatives such as a merge sort. Key features of a linear search: A loop is used to check the first value in a list and increment by 1 , checking each value for a match to the target . Reaching the last element of the list without finding a match means the value is not included . Key features of a binary search: A midpoint , lowpoint and highpoint are calculated . A while loop is used to repeatedly compare the midpoint to a target value . The upper half or lower half of the data is ignored if the midpoint does not equal the target . Key features of a merge sort: This algorithm calls itself from within the subroutine (this is known as a recursive algorithm ). It continually splits sublists into a left side and a right side until each sublist has a length of 1 . Watch on YouTube Watch on YouTube Watch on YouTube Watch on YouTube Key features of a insertion sort: Uses an outer for loop (count controlled ) to iterate through each value in the list . Uses an inner while loop (condition controlled ) to find the current value’s correct position in the sorted part of the list . An insertion sort moves ‘ backwards ’ to find the correct position of each value, by decreasing the index within the while loop. Watch on YouTube Q uesto's Q uestions 1.3 - Searching & Sorting Algorithms: Linear Search Explain step-by-step how the number 8 would be found in the following list using a linear search : 12, 5, 3, 2, 8, 19, 14, 6 [4 ] Binary Search Explain step-by-step how the number 2 would be found in the following list using a binary search : 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 [6 ] Merge Sort Explain step-by-step how a merge sort would sort the following list of numbers: 4, 8, 5, 1, 3, 6, 7, 2 [6 ] Bubble Sort Explain step-by-step how a bubble sort would sort the following list of numbers: 3, 1, 6, 5, 2, 4 [6 ] Insertion Sort Explain step-by-step how an insertion sort would sort the following list of numbers: 5, 2, 6, 3, 1, 4 [6 ] 1.2 - Designing Algorithms Theory Topics 2.1 - Programming Fundamentals
- 6.6 - Logical Protection | Unit 2 | OCR Cambridge Technicals | CSNewbs
Learn about the methods of digital protection including antimalware, firewalls and obfuscation. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification for Unit 2 (Global Information). 6.6 - Logical Protection Exam Board: OCR Specification: 2016 - Unit 2 Logical protection refers to using digital methods of security to protect computer systems and data. Usernames & Passwords ****** Anti-Malware Usernames must be matched with a secure password to minimise the chances of unauthorised users accessing a system. Passwords should contain a mix of uppercase and lowercase letters , punctuation and numbers . Passwords should be of a substantial length (at least 8 characters) and should be regularly changed . Anti-virus software scans a system and removes viruses . If left to infect a system a virus could delete data or permit access to unauthorised users . Anti-spyware software removes spyware on an infected system so hackers cannot view personal data or monitor users. Organisations should install and regularly update anti-virus and anti-spyware programs. Firewall Encryption Firewalls prevent unauthorised access to or from a network . Firewalls filter data packets and block anything that is identified as harmful to the computer system or network. Firewalls can also be used to block access to specific websites and programs. A firewall can be in the form of a physical device which is connected to the network, or software installed on a computer system. Encryption is the conversion of data ( plaintext ) into an unreadable format ( ciphertext ) so it cannot be understood if intercepted . Encrypted data can only be understood by an authorised system with a decryption key . There are two types of encryption . Encryption at rest is when data is encrypted while it is being stored on a system or storage drive. Encryption in transit is to secure the data as it being transferred between systems on a network. Tiered Levels of Access Obfuscation ?????? The purpose of tiered levels of access is to grant different types of permission to certain users. Managing levels of file access ensures that only authorised people can access and change certain files . There are different levels of file access : No access Read-only - Allows a user to view but not edit. Read/write - Allows a user to view and edit. Obfuscation is when data is deliberately changed to be unreadable to humans but still understandable by computers . Program code might be obfuscated to stop rival programmers from viewing and stealing it if they were able to access it. Specialist software can be used to obfuscate data and convert it back into a human-readable format. Q uesto's Q uestions 6.6 - Logical Protection: 1a. Describe why usernames and strong passwords are necessary. [2 ] 1b. State 3 rules for choosing a strong password . [3 ] 2. Describe the purpose of anti-virus and anti-spyware software. [4 ] 3. Describe the roles of a firewall . [4 ] 4. Explain what encryption is. What are the two types? [4 ] 5. Why would an organisation use tiered levels of access ? What are the 3 levels of file access ? [5 ] 6. What is obfuscation ? State a scenario in which it would be used. [3 ] 6.5 - Physical Protection Topic List
- 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
- 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 - Iteration For Loops Editor Execute A for loop is a count controlled loop. It repeats for a certain number of times as stated in the range brackets. The first number (1) states the number to start on . The second number is an exclusive end . This means it actually finishes on the number before . (11 will end on 10). You need a colon at the end of the loop line . Each line to be repeated must be indented (press the tab key). You can use the loop number within the loop itself. 1. Write a for loop to print your name 8 times . (Count it to double-check it prints eight times.) 2. Use a for loop to print each number between 10 and 50 . 3. Use a for loop from 1 to 10 . Print the 3 times table by multiplying number by 3 underneath the loop. 4. Ask the user to input a whole number (call it num1 ). Write num1 in your range brackets to repeat any message that many times. 5. Ask the user to input a whole number (call it num1 ) and then input a word . Print the word by the number they entered . (Hint: Use num1 in the range.) 6. Delete your code and copy these 3 lines: #Delete the space after the colon for number in range(0,21,2): print(number) What happens when you run this code? 7. Use Q6 to help you print 0 to 100 , going up in 5s . Think about the 3 values you need in the range brackets. 8. Use Q6 to help you print 100 down to 0 , backwards by 1 . Think about the 3 values you need in the range brackets. Tasks While Loops Editor Execute A while loop is a condition controlled loop . While loops repeat as long as the condition is true . As soon as the condition becomes false , the loop will end . 1. Change the program in the editor to repeat the loop while a number is not equal to 33 . 2. Make a new while loop that asks the user to enter a whole number . While the number is less than or equal to 1000 , keep repeating. 3. Make a new while loop for while a colour is not equal to purple (or any colour you want). Ask the user to enter a colour inside of the loop . Don't forget to set colour to "" before you start. 4. Edit your colour program to count how many guesses were made. Make a new variable called count and set it to 0 at the start of the program. Increase it by 1 in the loop, using count = count + 1 . 5. While a total is less than 100 , ask the user to input a decimal number . When it is over 100 , print ‘COMPUTER OVERLOAD’ . You need a variable called total . Increase the total each time with total = total + number . Don't forget to start it at 0 . Tasks != means ‘not equal to ’. The loop below will repeat as long as the password is not equal to “abc123” . Any variable you use in your condition must have a value first . You can’t check for your password if it doesn’t exist. That’s why I have written password = “” , to give password a value before we check it .









