Search CSNewbs
268 results found with an empty search
- Unit 1 - Fundamentals of IT - Cambridge Technicals | CSNewbs
Navigate between all Unit 1 (Fundamentals of IT) topics in the OCR Cambridge Technicals Level 3 IT 2016 specification. OCR Cambridge Technicals IT Level 3 Unit 1: Fundamentals of IT These pages are based on content from the OCR Cambridge Technicals 2016 Level 3 IT specification . This website is in no way affiliated with OCR . This qualification stopped in July 2025. The pages on the site will remain for at least two years. LO1 (Computer Hardware ) 1.1 - Computer Hardware 1.2 - Computer Components 1.3 - Types of Computer System 1.4 - Connectivity 1.5 - Communication Hardware 1.6 - Hardware Troubleshooting 1.7 - Units of Measurement 1.8 & 1.9 - Number Systems & Conversion LO2 (Computer Software ) 2.1 - Types of Software 2.2 - Applications Software 2.3 - Utility Software 2.4 - Operating Systems 2.5 - Communication Methods 2.6 - Software Troubleshooting 2.7 - Protocols LO3 (Networks & Systems ) 3.1 - Server Types 3.2 - Virtualisation 3.3 - Network Characteristics 3.4 - Connection Methods 3.5 - Business Systems LO4 ( Employability & Communication ) 4.1 - Communication Skills 4.2 - Communication Technology 4.3 - Personal Attributes 4.4 - Ready for Work 4.5 - Job Roles 4.6 & 4.7 - Bodies & Certification LO5 (Issues & Security ) 5.1 - Ethical Issues 5.2 - Operational Issues 5.3 - Threats 5.4 - Physical Security 5.5 - Digital Security 5.6 - Data & System Disposal
- 2.1 - Programming Fundamentals - OCR GCSE (J277 Spec) | CSNewbs
Learn about the fundamentals of programming - selection, sequence and iteration. Also find out the difference between local and global variables and constants. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). Exam Board: OCR Specification: J277 2.1: Programming Fundamentals Watch on YouTube : Programming Fundamentals Sequence Selection Iteration Operators This section of the specification includes programming topics that are outlined in 1.2 (Designing Algorithms). You must have an understanding of a range of programming techniques , such as how to use selection , loops and operators . The best practice for learning is to try the tasks in the Python pages on this website (see the link to the right). Visit the Python section of CSNewbs ---> Programming Constructs There are three constructs ( ideas of programming ) that are used to control the flow of a program : Sequence Structuring code into a logical, sequential order . Selection Decision making using if statements . Iteration Repeating code using for or while loops . Variables Variables are used to store data in programs. They can be changed as the program runs . A variable has two parts - the data value such as "Emily" and an identifier such as First_Name . An efficient program will use variables with sensible identifiers that immediately state their purpose in the program. Using variable names like 'TotalNum' and 'Profit' rather than 'num1' and 'num2' mean that other programmers will be able to work out the purpose of the code without the need for extensive comments. Local & Global Variables Large programs are often modular - split into subroutines with each subroutine having a dedicated purpose. Local variables are declared within a specific subroutine and can only be used within that subroutine . Global variables can be used at any point within the whole program . Local variable advantages Saves memory - only uses memory when that local variable is needed - global variables use memory whether they are used or not. Easier to debug local variables as they can only be changed within one subroutine. You can reuse subroutines with local variables in other programs. Global variable advantages Variables can be used anywhere in the whole program (and in multiple subroutines). Makes maintenance easier as they are only declared once. Can be used for constants - values that remain the same. Constants π As specified before, a variable is data that can change in value as a program is being run. A constant is data that does not change in value as the program is run - it is fixed and remains the same. An example of a constant in maths programs is pi - it will constantly remain at 3.14159 and never change. Operators Comparison Operators Comparison operators are used to compare two data values . A table of common comparison operators used in programs are below: Arithmetic Operators Arithmetic operators are used to mathematically manipulate values . The most common arithmetic operators are add (+ ), subtract (- ), multiply (* ) and divide (/ ). Further arithmetic operators are shown below: Modulo division (also known as modulus ) reveals the remainder from the last whole number . For example: 9 % 4 = 1 (4 goes into 9 twice (8) with a remainder of 1) Integer division (also known as quotient ) reveals the ‘whole number of times ’ a number can be divided into another number : 9 // 4 = 2 (4 goes into 9 fully, twice) The symbol ^ represents exponentiation . However, Python uses ** to represent exponentiation. For example '2^3 = 8' is equivalent to '2³ = 8'. Logical Operators Logical operators typically use TRUE and FALSE values which is known as Boolean . You can find more information about Boolean values in section 4.1 . Q uesto's Q uestions 2.1 - Programming Fundamentals: Programming Constructs 1. Describe and draw a diagram for the 3 programming constructs . [6 ] Variables 1. What is the difference between local and global variables ? [4 ] 2. Describe two advantages of using local variables . [2 ] 3. Describe two advantages of using global variables . [2 ] 4. What is a constant ? Give an example . [2 ] 1.3 - Searching & Sorting Theory Topics 2.2 - Data Types
- Python | 2b - Inputting Numbers | CSNewbs
Learn how to input numbers in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python 2B - Inputting Numbers Inputting Whole Numbers in Python To enter whole numbers then you must use the int command. int stands for integer (a whole number ) and is typed before input – don’t forget the double brackets at the end . age = int ( input ( "How old are you? " )) print ( "Have you really lived for " , age , "years?" ) = How old are you? 99 Have you really lived for 99 years? Inputting Numbers Task 1 ( Zoo) Type an input line (with int ) to ask the user how many times they’ve been to the zoo . Print a reply that uses the zoo variable (their answer). Example solution: How many times have you been to the zoo? 3 You've been to the zoo 3 times? I love animals! Inputting Decimal Numbers in Python Using float instead of int allows a decimal number to be entered instead. Again, don’t forget the double brackets at the end . miles = float ( input ( "How far have you walked today? " )) print ( "You really walked for " , miles , "miles? Wow!" ) = How far have you walked today? 5.6 You really walked for 5.6 miles? Wow! Inputting Numbers Task 2 ( Height ) Type an input line (with float ) to ask the user their height in metres. Print a reply that uses the height variable (their answer). Example solution: What is your height in metres? 1.82 You are 1.82 metres tall? Wow! ⬅ 2a - Inputting Text Sect ion 2 Practice Tasks ➡
- 4.2 - Client Requirement Specfications | F160 | Cambridge Advanced National in Computing AAQ
Learn about the importance of client requirement specifications and the need for specific elements such as functional requirements, process constraints and data formats. Based on Unit F160 (Fundamentals of Application Development) for the OCR Cambridge Advanced National in Computing (H029 / H129) (AAQ - Alternative Academic Qualification). Qualification: Cambridge Advanced National in Computing (AAQ) Unit: F160: Fundamentals of Application Development Certificate: Computing: Application Development (H029 / H129) 4.2 - Client Requirement Specifications Watch on YouTube : Client Requirement Specifications A client requirement specification is a detailed document that outlines what the client needs from a new system . Elements include the new system’s purpose , functional and non-functional requirements , constraints and success criteria . As well as understanding the importance of creating client requirement specifications , you need to know the purpose of each element and how they can be gathered using the methods from section 4.1 . Client Requirement Specifications Elements of Requirement Specifications Specifications ensure developers and stakeholders fully understand what the client wants the system to do , avoiding misunderstandings and costly changes later. There are several elements of client requirement specifications you need to know : Purpose of the new system Current system deficiencies Requirements ( functional and n on-functional ) Data formats Process constraints Version and source control Client-defined constraints Three considerations for data storage location are local/onsite , cloud and physical storage devices . Budget Time Integration Software Hardware Data storage location Q uesto's Q uestions 4.2 - Client Requirement Specifications: 1. Give three reasons why it is important to create a client requirement specification . [8 ] 2. Describe the purpose of each client-defined constraint . [6 ] 3. Describe the difference between functional and non-functional requirements . [ 2 ] Some cloud storage data centres are built in cold climates , such as Sweden and Norway , to reduce cooling costs for servers that run 24/7 . D id Y ou K now? 4.1 - Gathering Client Requirements Topic List 4.3 - Decomposition Methods
- CTech 4.4 - Ready For Work | CSNewbs
Learn about three key methods of ensuring that an employee is ready for a successful job role, such as their clothing, hygiene and attitude. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification. 4.4 - Ready for Work Exam Board: OCR Specification: 2016 - Unit 1 Successful employees always demonstrate that they are ready to work hard for their organisation by presenting themselves in a professional manner in line with the company's policies. Dress Code Employees must follow the dress code policy of an organisation at all times . For some businesses this may be very formal such as a suit and tie for men and a smart dress or trousers for women. Other organisations enforce a smart-casual dress code where expectations for dress are not as strict but obscene attire is still not permitted. Different job roles within a company may also have different expected standards of dress , for example a manager may require a tie and a technician may not. Presentation Employees should have good personal hygiene so that they can comfortably communicate with other staff members and customers. Good personal hygiene demonstrates respect for the organisation, other employees and yourself. Wearing clean clothes and avoiding bad odour help to give a professional impression . Attitude Maintaining a positive attitude can help you to be noticed and liked by peers and management. Having an 'I can do it' attitude, even during difficult times, will make you a hugely important team member of an organisation. Employees should be able to adapt and respond to on-going situations, be flexible and listen to suggestions made by others. Q uesto's Q uestions 4.4 - Ready for Work: 1. What is meant by a dress code ? Explain why it is important for employees of an organisation to follow the company's dress code policy . [2 ] 2. Why is personal presentation so important in an organisation? [2 ] 3. A games company has had its latest game flop and nobody seems to be buying it. What should the attitude of the company manager be during this time? [3 ] 4. Explain why two workers in the same company may have different expected standards of dress . [1 ] 5. Identify and describe three ways that IT employees can demonstrate that they are ready for work . You should refer to each of the 3 subsections (dress code, presentation and attitude). [6 ] 4.3 - Personal Attributes Topic List 4.5 - Job Roles
- Python | Section 10 Practice Tasks | CSNewbs
Test your understanding of working with files in Python, including reading, searching, writing and editing. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. Python - Section 10 Practice Tasks Task One Create a file in Python called DaysOfTheWeek.txt. Write the days of the week into the file in a single print line but put each day on a new line. Check the file to see if it has worked. Example solution: Task Two Create a file called Colours.txt. Use a for loop to ask the user to enter 8 different colours. Write each colour onto the same line, with a space between the colours. Close the file and open it again in read mode and print it. Example solution: Task Three Create a file named "Holiday.txt". Ask the user to enter the family name, destination and and number of passengers. Print each family's details on their own line. Bonus: Edit this program to add a search feature to look for the family name. Example solution: Task Four Use the holiday file from task three above. You are going to change the destination. Ask the user to enter a family name and then a new destination. Update the destination with the new value. Check the file to ensure the destination has been updated successfully. Use section 10c to help you with this task. Example solution: ⬅ 10c - Remove & Edit Lines 11 - Graphical User Interface ➡
- 1.3.2 - Software Categories | F160 | Cambridge Advanced National in Computing | AAQ
Learn about the purpose, characteristics, advantages, disadvantages, examples and client requirements of application software categories including open, closed, shareware, freeware and embedded software. Resources 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) 1.3.2 - Application Software Categories Watch on YouTube : Open Software Closed Software Shareware Freeware Embedded Software There are five application software categories you need to know : Open Closed Shareware Freeware Embedded For each software category you need to know : Its purpose and common characteristics . The types of devices the software may be used on. The advantages and disadvantages of using the software. How client requirements affect the selection of that software. Application Categories Open Software Closed Software Open (usually known as open-source ) software is developed to be freely accessible and allow users to view , modify and distribute the source code . Its purpose is to promote collaboration and customisation when developing software . Closed (or closed-source or proprietary ) software is developed and distributed by a company or individual who owns the source code . The purpose is to maintain control , generate profit and ensure a consistent user experience . Shareware Shareware is closed software that is distributed for free on a trial basis , often with limited features or time restrictions . The purpose is to let users try before they buy , encouraging them to later purchase the full version . Freeware Freeware is closed software that is completely free to use , usually without restrictions like time limits or limited features , but still owned by a developer or company . The purpose is to provide software for free while retaining control over its code and distribution . Embedded Software Embedded software is designed to run on specific hardware and perform dedicated tasks . It is usually built into devices that are not traditional computers (like washing machines or microwaves ), allowing those devices to function efficiently and potentially automatically . Q uesto's Q uestions 1.3.2 - Application Software Categories: 1. Summarise the five categories of application software in two sentences each . [5 ] 2. An independent video game company has made a short game with just three levels. Justify which application software category they should use and why . [4 ] 3. Describe the advantages and disadvantages of using embedded software . [ 4 ] WinRAR is a shareware compression tool with a 40-day free trial , but it never actually locks users out. Since 1995 , WinRAR has been downloaded an estimated 500 million times . D id Y ou K now? 1.3.1 - Application Types Topic List 1.3.3 - Application Software Types
- Python | 1a - Printing | CSNewbs
Learn how to create print statements in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python 1a - Printing Printing in Python To output a message onto the screen, use the print command. Then place your message within brackets and speech marks . For example: print ( "Welcome to Python!" ) When you run the program, the text will print to the Python console: Welcome to Python! Printing Task 1 (Full Name & To Your Left) On the first line, print your first name and surname. On the next line, write another print statement to print t he name of the person (or thing) to your left. Example solution: Elsie Parker pencil case Printing over Several Lines One way of writing across multiple lines is to write several print commands like this: print ( "Welcome to...." ) print ( "Computer Science " ) print ( "Newbies!!! " ) = Welcome to .... Computer Science Newbies!!! However, when we program, we always want to make our code the most efficient it can be by using as few lines as possible . Therefore you can write \n within a printed statement to move it to the next line. Make sure you use \ and not / otherwise it will print the slash and not make a new line! print ( "Welcome to....\n Computer Science\n Newbies!!! " ) = Welcome to .... Computer Science Newbies!!! Both pieces of code display the same thing, but the second one is more efficient because it only uses one line. Printing Task 2 (Name, Colour, Movie) Use \n to write your name, favourite colour and favourite movie in only one line of code. Example solution: Matthew yellow Interstellar ⬅ Setting Up Python 1b - Comments ➡
- OCR CTech IT | Unit 1 | 3.3 - Network Characteristics | CSNewbs
Learn about network topologies including client-server, peer-to-peer, bus, mesh and star. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification. 3.3 - Network Characteristics Exam Board: OCR Specification: 2016 - Unit 1 Network Topologies Network topology refers to the arrangement of computer systems on a network . Devices in a network topology diagram are often called ' nodes ' . Client-Server Network Clients make requests to a server , the server manages that request and responds . For example, if the user (client) makes a request to access www.csnewbs.com to a web server . Large services like Amazon and Google will need very powerful servers to handle millions of requests a second. The client is completely dependent on the server to provide and manage the information. The server controls network security , backups and can be upgraded to manage higher demand. Disadvantages: Large amounts of traffic congestion will cause the network to slow down . If a fault occurs with the server then the whole network will fail . IT technicians may be required to manage and maintain the network . Malware , such as viruses, can spread quickly across the network. Peer-to-Peer Network For peer-to-peer networks , data is shared directly between systems without requiring a central server . Each computer is equally responsible for providing data. Peer-to-peer is optimal for sharing files that can then be downloaded. Bus Topology The nodes are connected to a bus (a central cable which transfers all data on the network). How it works: The bus transfers data packets along the cable . As the data packets arrive at each computer system, the computer checks the destination address contained in the packet to see if it matches its own address . If the address does not match , the computer system passes the data packet to the next system . If the address of the computer system matches the destination address in the data packet, it is accepted and processed. At both ends of the cable are terminators to mark the end of the bus. Advantages: Because of the simple layout, it is easy to attach another system to the main cable without disrupting the whole network . A bus topology is quick to set up once the main cable has been established making it optimal for temporary networks . A bus topology is cost-effective because it usually contains less cabling than other topologies and requires no additional hardware (like a hub or switch). Disadvantages: Poor security as data packets are passed on to each system on the network. Data collisions are likely - this is when two systems attempt to transfer data on the same line at the exact same time. Resending the data wastes time and slows down the network . The main cable will only have a limited length which can become crowded and slows network speed as more systems are attached. The main cable must also be terminated properly . Token Ring Topology In a token ring network , computer systems are connected in a ring or a loop. How it works: A token (small data packet) is sent around the ring in one direction, being passed from one computer system to the next. A computer seizes the token and includes its own data when it transfers data. As the token arrives at each computer system, the system checks the destination address contained in the packet to see if it matches its own. If the addresses match, the computer processes the data otherwise it ignores it. Advantages: Data collisions are avoided as data packets are transmitted in one direction around the ring. Attaching more systems to a ring topology won't affect the transfer speed as much as other layouts like a bus topology because the data is transferred at a consistent speed . Disadvantages: If any system on the network fails then the whole network fails as the loop is broken and data can't be transferred to all systems. To add a new system to a ring topology the network must be temporarily shut down . Star Topology In a star network , each computer system is connected to a central node: a hub or switch . How it works: Each node is connected to the central node (usually a hub or switch ) and transfers its data packets here. The hub/switch looks at the destination address and transfers the packets to the intended computer only. Advantages: A star topology has improved security because data packets are sent directly to and from the hub / switch in the centre and not necessarily all devices like in a bus or ring topology. New systems can be attached directly to the central system so the network doesn't need to be shut down . System failures of attached computers won't usually cause complete network failure. Transfer speeds are generally fast in a star topology as there are minimal network collisions . Disadvantages: Extra hardware (the hub or switch) is required to be purchased, installed and maintained. If the central system (the hub or switch) fails then the whole network will be unusable until the error is fixed. Mesh Topology In a mesh network, each computer system is connected to every other computer system . How it works: Data packets are transferred to the destination address along the quickest path, travelling from node to node. If a pathway is broken, there are many alternative paths that the packets can take. Advantages: If one cable or system fails then data packets can take an alternative route and still reach the destination address. Because of the large possible number of systems and connections, a mesh topology can usually withstand large amounts of data traffic . New systems can be added to the network without disrupting the entire topology . Disadvantages: Because of the possibly large amount of cables required (especially in a complete mesh topology) this network layout can be expensive to install and maintain . Redundant cabling should be avoided - this is when cables are connected between systems that won't ever need to communicate . Configuration Before a computer system can use a network, three pieces of information must be configured (set up) correctly. IP Address An IP address is used to uniquely identify computer systems on a network , allowing communication between them. An example of an IP address is 195.10.213.120. Default Gateway When data is to be sent from one network to another , it must be sent through a default gateway . This default gateway is usually a router that connects the local network to another network . On many home networks , the default gateway will use the same private IP address : 192.168.1.1 Network managers can use automatic configuration which is quicker and easier to set up . A new device can connect to and use a network automatically , such as free WiFi in an airport. Network managers can also set manual configuration which improves security as new devices can’t be used until the addresses have been configured by a technician . This stops unauthorised devices from connecting to the network. Subnet Mask Subnetting is the act of dividing a physical network into smaller 'sub' networks (known as subnets ) . This helps to reduce traffic and means that users can externally access parts of a network (e.g. emails from home) without having to open the entire network. A subnet mask is used to define these subnets . The mask is used to determine the start and end address of each IP address in a subnet. A common subnet mask is 255.255.255.0 as making the first 3 sections full restricts the fourth section to 256 unique values. For example 113.12.14.230 and 113.12.14.157 are in the same subnet but 114.12.14.127 wouldn't be. Q uesto's Q uestions 3.3 - Network Characteristics: 1 a. Describe how peer-to-peer networks and client-server networks function. 1b. Give one use for both types of network. 2a. Draw and label a diagram for all 6 network topologies . 2b. Describe 2 advantages and 2 disadvantages of each network topology . 3 . What is an IP address ? Why is it necessary for networks? 4. Describe what is meant by a default gateway . 5a. What is subnetting ? 5b. What is the purpose of a subnet mask ? 5c. State a common subnet mask . How many unique devices can be used on a network with this subnet mask? 6. Describe 1 reason why a network manager may use automatic configuration and 1 reason why they may use manual configuration . Advantages: The network can be controlled centrally from the server to easily backup data and update software . Hardware, software and resources can be shared across the network, such as printers, applications and data files . The network allows for improved scalability , meaning more clients can be easily added to the central server . Disadvantages: Without a dedicated server there is no central device to manage security or backups . Backups must be performed on each individual system. Computer performance will decrease with more devices connected to the network, especially if other machines are slow. Advantages: This is a simpler network than client-server to set up as no server is required . Clients are not dependent on a server . Perfect for quickly sharing files between systems , such as downloading media files. 3.2 - Virtualisation Topic List 3.4 - Connection Methods
- Python | 6b - While Loops | CSNewbs
Learn how to create and use while loops in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python 6B - While Loops Types of Loop The third construct of programming (after Sequence and Selection) is Iteration . If you iterate something, then you repeat it. There are two key loops to use in Python: for loops and while loops . A for loop is count controlled – e.g. “For 10 seconds I will jump up and down”. The loop will continue until the count (e.g. 10 seconds) has finished . A while loop is condition controlled – e.g. “While I am not out of breath, I will jump up and down.” The loop will continue as long as the condition remains true . Simple While Loops A while loop keeps repeating as long as the starting condition is true . If the condition of the while loop becomes false , the loop ends . In this example, the number variable is increased by 1 inside of the loop until it is no longer less than or equal to 10 . number = 1 while number <= 10: print (number) number = number + 1 1 2 3 4 5 6 7 8 9 10 Comparison Operators == equal to != not equal to < less than <= less than or equal to > greater than >= greater than or equal to It is important to give the variable a value before you start the while loop . I have assigned number as 1. The last line increases the number by 1 otherwise the number would stay at 1 and the loop would repeat forever . While Loops Task 1 (Countdown from 100 ) Example solution (shortened): Create a simple while loop that starts at 100 and prints each number down to 1 . Think about the comparison operator you will need to check you have reached 1. 100 99 98 ... ... 3 2 1 Inputs Inside While Loops If you want the user to keep entering an input until they give a certain answer then you need to put the input inside the while loop : age = 0 while age < 18: print ( "Only adults allowed to the casino." ) age = int ( input ( "Enter your age: " )) print ( "Welcome and enjoy your visit." ) Only adults allowed to the casino. Enter your age: 14 Only adults allowed to the casino. Enter your age: 18 Welcome and enjoy your visit. month = " " while month != "July" : month = input ( "Guess the month I'm thinking of: " ) print ( "Correct! It was July!" ) Guess the month I'm thinking of: August Guess the month I'm thinking of: June Guess the month I'm thinking of: July Correct! It was July! Notice that the variable in the condition (age or month in these examples) has to be given a value first before it can be used in a while condition. The program will crash if the variable is not declared and assigned a value - for example, the age cannot be checked to see if it less than 18 if there is no age variable! For string variables like month in the example above then a blank default value like " " can be used. For integer variables often 0 will be used. While Loops Task 2 (Guess the Colour ) Example solution: Use a variable named colour and a while loop that allows the user to keep entering colours until a specific one (your choice) has been input. Guess the colour: blue Guess the colour: purple Guess the colour: yellow Correct! It was yellow! While Loops Task 3 (Integer Trivia ) Use a while loop to ask a question that has an integer (whole number) as an answer , such as "How many James Bond films did Daniel Craig appear in?" or "In which year did Wigan Athletic win the FA Cup?". Remember that integers do not use speech marks , e.g. year = 0 Example solution: Which year was the first Iron Man movie? 2010 Which year was the first Iron Man movie? 2009 Which year was the first Iron Man movie? 2008 Correct! It was 2008! While True Loops A while True loop will repeat indefinitely , only stopping when the break command is used to end the loop . While True loops are often preferred because you do not need to set default values for any variables before the loop begins. while True : password = input ( "Enter the password: " ) if password == "icecream21" : print ( "Correct Password!" ) break Enter the password: vanilla32 Enter the password: chocolate83 Enter the password: strawberry100 Enter the password: icecream21 Correct Password! The program below has been adapted to record the number of attempts made . The value is increased by 1 each time the loop restarts. guesses = 0 while True : guesses = guesses + 1 password = input ( "Enter the password: " ) if password == "goat7" : print ( "Correct Password! It took" ,guesses, "attempts!" ) break else : print ( "Incorrect. Try again!" ) Enter the password: sheep3 Incorrect. Try again! Enter the password: cow4 Incorrect. Try again! Enter the password: horse5 Incorrect. Try again! Enter the password: goat7 Correct Password! It took 4 attempts! The continue command will move to the next iteration (it can be considered as starting the loop again ). The program below allows numbers to be entered and keeps track of a running total. Entering 1 inputs a number, 2 displays the total and 3 stops the program. total = 0 while True : choice = input ( "\nType 1 to enter, 2 for a total and 3 to stop: " ) if choice == "1" : number = int ( input ( "Enter a number: " )) total = total + number continue elif choice == "2" : print ( "The total is" , total) continue elif choice == "3" : break print ( "\nProgram finished." ) Type 1 to enter, 2 for the total and 3 to stop: 1 Enter a number: 40 Type 1 to enter, 2 for the total and 3 to stop: 1 Enter a number: 35 Type 1 to enter, 2 for the total and 3 to stop: 2 The total is 75 Type 1 to enter, 2 for the total and 3 to stop: 3 Program finished. While Loops Task 4 (Guess the Planet ) Example solution: Use a while True loop to keep asking a user to input a planet . Keep track of the number of guesses that have been made and output the total when they input the correct planet. Use the second example in the 'While True Loops ' section above to help you. Enter a planet: Mars Incorrect guess, try again! Enter a planet: Mercury Incorrect guess, try again! Enter a planet: Neptune Correct it was Neptune! While Loops Task 5 (Up to 100 ) Create a while True loop that asks the user to enter a number . Add the number to a total variable and print it. When the total reaches 100 or more , stop the program. Don't forget to set the total variable to 0 at the start and to add the number entered by the user to the total. Example solution: Enter a number: 34 The current total is: 34 Enter a number: 29 The current total is: 63 Enter a number: 18 The current total is: 81 Enter a number: 22 The current total is: 103 Over 100! ⬅ 6a - F or Loops Section 6 Practice Tasks ➡
- 2.3 - Units - OCR GCSE (J277 Spec) | CSNewbs
Learn about different data units of storage from bit up to petabyte, as well as data capacity calculations. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). 2.3: Data Units Exam Board: OCR Specification: J277 Watch on YouTube : Units of Data Storage Capacity Requirements All computer systems communicate , process and store data using binary . Binary is a number system consisting entirely of 0s and 1s . Why do computers use binary? Computer systems consist of billions of tiny transistors which are switches that only have two values - on (1 ) or off (0 ). Therefore all data must be represented and processed in this way. Everything that a computer needs to process must be converted into a binary format including text , images , videos and audio . 0010 1011 0101 0101 0110 0111 0101 0001 0101 0101 0101 0100 1010 1010 1010 1010 1111 1110 0010 1001 0100 1001 0010 0111 0111 0101 0011 1010 1000 0101 0110 0111 0000 1010 1010 0011 1101 1001 0010 1101 0010 0100 1001 0011 1010 1001 0101 0101 0010 0101 0111 0101 0101 1000 1011 0111 Units of Data Storage 0 / 1 All data in a computer system is made up of bits . A single bit is a 0 or a 1 . 4 bits (such as 0101 or 1101) is called a nibble . 1,000 bytes is called a kilobyte . A kilobyte can store a short email . A 8 bits is called a byte . A byte can store a single character . 1,000 kilobytes is called a megabyte . A megabyte can store about a minute of music . 1,000 megabytes is called a gigabyte . A gigabyte can store about 500 photos . 1,000 terabytes is called a petabyte . A petabyte can store about 1.5 million CDs . 1,000 gigabytes is called a terabyte . A terabyte can store about 500 hours of films . Calculating Data Capacity Requirements It is important to be able to calculate the required storage capacity for a given set of data . Example: A local DJ has a USB memory stick with a capacity of 32GB . There is currently only 9GB of space remaining . Each song is 6MB . How many songs can be stored on the remaining space of the USB stick? Solution: Because each song is recorded in megabytes but the USB stick capacity is measured in gigabytes , the values must be converted into the same storage unit . 9GB x 1000 = 9000MB 9000MB ÷ 6MB = 1,500 songs Q uesto's Q uestions 2.3 - Data Units: 1. Explain why computer systems use binary to represent data. [ 2 ] 2. Put the following data storage units in order from smallest to largest : a . kilobyte - gigabyte - byte - megabyte - nibble - bit [3 ] b. gigabyte - petabyte - kilobyte - byte - terabyte - megabyte [ 3 ] 3. A hard drive contains 25GB of remaining available storage space. Tim is an animator backing up video files. Each file is 200MB . How many files can he fit on the hard drive? [ 2 ] 4. Samantha is a musician. She has compressed each song to 900KB . Her USB memory stick contains 1.2GB of free storage. How many songs can she fit on the USB stick? [ 2 ] 5. A CD has a capacity of 650MB . How many 0.2GB audio files can be stored on the CD? [ 2 ] 0101 2.2 - Secondary Storage Theory Topics 2.4a - Number Systems
- 1.1b - Registers & FE Cycle - OCR GCSE (J277 Spec) | CSNewbs
Learn about key registers used in the fetch - execute cycle such as the program counter and current instruction register. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). 1.1b: Registers & The F-E Cycle Exam Board: OCR Specification: J277 Watch on YouTube : Registers in the FE Cycle Reading instructions The fetch - execute (F-E) cycle is performed by the CPU millions of times every second. This cycle is how the CPU processes data and instructions for each program or service requiring attention . Important Registers A register is a small storage space for temporary data in the CPU . Each register has a specific role . There are four essential registers used in the F-E cycle : Program Counter (PC) A register that tracks the RAM address of the next instruction to be fetched . Memory Address Register (MAR) Stores the RAM address of the current instruction (or data ) the CPU needs to access . Memory Data Register (MDR) The MDR stores the instruction that has been transferred from RAM to the CPU . Accumulator (ACC) The ACC stores the result of mathematical or logical calculations . The PC , MAR and MDR are used in the fetch stage , whereas the ACC is used in the execute stage . The PC and MAR store an address (a memory location in RAM ) whereas the MDR and ACC store data (a value ). Fetch - Execute Cycle The essential idea of the F-E cycle is that instructions are fetched from RAM , to be decoded (understood) and executed (processed) by the CPU . 1. The Program Counter (PC ) register displays the address in RAM of the next instruction to be processed . This value is copied into the Memory Address Register (MAR ). 0054 2. The PC register is increased by 1 . This prepares the CPU for the next instruction to be fetched. 0055 3. The CPU checks the address in RAM which matches the address held in the MAR . 0054 4. The instruction in RAM is transferred to the Memory Data Register (MDR ). MDR 5. The instruction is decoded by the contol unit which splits the instruction into an opcode (an action ) and an operand ( data or address ). 6. The instruction i s executed (run). Any result of an execution is stored in the Accumulator (ACC ) register, such as calculations made by the ALU . ACC 7. The cycle repeats by returning to the first step and checking the program counter for the address of the next instruction . Q uesto's Q uestions 1.1b - Registers & The F-E Cycle: 1 . What is the purpose of the registers ? [1 ] 2 . Describe the purpose of each register : a. The Program Counter (PC) [ 2 ] b. The Memory Address Register (MAR) [ 2 ] c. The Memory Data Register (MDR) [ 2 ] d. The Current Instruction Register (CIR) [ 2 ] e. The Accumulator (ACC) [ 2 ] 3. Draw a diagram with icons and words to show the steps of the Fetch - Execute cycle . [7 ] 1.1a - The CPU Theory Topics 1.2 - CPU Performance