Search CSNewbs
290 results found with an empty search
- Python | 1d - Using Variables | CSNewbs
Learn how to use variables in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python 1d - Using Variables Printing Variables Within Sentences Join sentences and variables together using a plus symbol (+ ). Joining strings together like this is called concatenation . name = "Marina" print( "Hello " + name + ", nice to meet you." ) = Hello Marina, nice to meet you. Remember to use speech marks for your printed statements but no speech marks for variable names . You need to use the + symbol before and after each variable. direction = "north" country = "Wales" print ( "Have you been to the " + direction + " of " + country + "?" ) = Have you been to the north of Wales? Commas can be used an alternative to the + symbol but they will automatically add a space . day = "Saturday" print ( "My birthday is on a" + day + "this year." ) print ( "My birthday is on a" , day , "this year." ) = My birthday is on aSaturdaythis year. My birthday is on a Saturday this year. Using Variables Task 1 ( Pizza Toppings) Use a variable named topping1 and another named topping2. Print a sentence that uses both variables names. Example solution: My favourite pizza is ham and mushroom. Printing Number Variables Within Sentences To join strings and number values then you must use a comma as a plus will not work: cookies = 4 print ( "Munch! There's only" , cookies , "left." ) = Munch! There's only 4 cookies left. You need to use a comma before and after each variable. Using Variables Task 2 ( Stars ) Make a variable named stars and set it to a large number. Print a sentence with the stars variable. Example solution: I think there are 827392012 stars in the sky! Using Variables Task 3 ( Age & Month) Use a variable named age and set it to your current age. Make a variable named month and set it to the month you were born. Remember to use speech marks for text , e.g. month = "August" but no speech marks for numbers (your age). Print a sentence that uses both variables names . Example solution: I am 14 and I was born in August. Using f-Strings Another method of using variables within a printed sentence is to use f-strings . Type the letter f before your output and place your variable names in curly brackets - { } Variables of any data type can be used with f-strings. name = "Tony Stark" alias = "Iron Man" print( f"Did you know {name} is actually {alias} ?" ) = Did you know Tony Stark is actually Iron Man? Using Variables Task 4 ( F-Strings) Create and give a value to three variables : movie_name actor year Use an f-string to print a sentence that uses all three variables. Example solution: Did you know that Harry Potter and the Order of the Phoenix stars Daniel Radcliffe and was released in 2007? ⬅ 1c - Creating Variables Sec tion 1 Practice Tasks ➡
- 4.3 - Decomposition Methods | F160 | Cambridge Advanced National in Computing AAQ
Learn about the decomposition methods used in project planning such as abstraction, pattern recognition, modularisation (top down and bottom up) and parsing of requirements. 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.3 - Decomposition Methods Watch on YouTube : Abstraction Pattern Recognition Modularisation Parsing of Requirements Decomposition methods break complex problems or systems into smaller , more manageable parts . This makes development easier to plan , understand and implement . Decomposition also helps reduce errors and improve efficiency , as individual tasks can be more easily tested and debugged. For each of the four decomposition methods ( abstraction , pattern recognition , top-down and bottom-up modularisation and parsing requirements ) you need to know when each method is suitable to use , its advantages and disadvantages , how client requirements affect their selection and how they can be used to visualise application designs . Decomposition Methods Abstraction Abstraction is the process of simplifying a problem by ignoring irrelevant data and focusing only on the most important details . It is used in the early stages of design or planning , when managing complexity in large systems and when creating reusable components . Pattern Recognition Pattern recognition is used to identify similarities or trends in problems or client requirements . This allows for the reuse of existing components and aids in finding solutions for common issues . It is used during the planning or analysis phases and when dealing with similar tasks , inputs , outputs or processes . Modularisation Modularisation refers to the individual components that make up a larger project . In top-down modularisation , a larger system is broken down from a general overview into its most specific parts . The purpose of bottom-up modularisation is to build the system starting with the smaller , detailed components and combining them into larger subsystems . Parsing of Requirements To parse requirements means to systematically break down and analyse client requirements into actionable tasks or functions . It is used at the start of a project to ensure shared understanding between development teams and clients . Q uesto's Q uestions 4.3 - Decomposition Methods: 1. Explain the differences between top-down and bottom-up modularisation . [4 ] 2. Explain when abstraction would be an appropriate decomposition method to use. [3 ] 3. What are the advantages and disadvantages of parsing requirements ? [ 4 ] 4. Give one way each decomposition method can be used in software application development . [ 4 ] Alan Turing and his team used pattern recognition to analyse recurring sequences in encrypted German messages , helping to break the Enigma code , which was a major factor in the Allies’ victory in World War II . D id Y ou K now? 4.2 - Client Requirement Specs Topic List 5.1.1 - Human-Computer Interaction
- OCR CTech IT | Unit 1 | 5.3 - Threats | CSNewbs
Learn about 7 key threats to avoid on the internet, including virus, worm, trojan interception, social engineering and eavesdropping. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification. 5.3 - Threats Exam Board: OCR Specification: 2016 - Unit 1 What are the 7 threats to computer systems? Phishing Misleading individuals or organisations into giving up sensitive information (such as passwords or bank details), often through the use of emails . Hacking Exploiting weaknesses in a system or network to create, view, modify or delete files without permission. Similar to data theft - illegally removing copies of personal or company data from computer systems. :( Trojan Appears to be a useful or well-known program but when downloaded and installed it secretly gives the attacker a ' backdoor ' to your system. Through this backdoor the attacker can access data without the user knowing. Football 2020 FREE Interception Data packets on a network are intercepted by a third party (e.g. hacker) and copied, edited or transferred to a different location than the intended destination. Eavesdropping Intercepting , in real-time , private communication traffic such as instant messages or video calls . Social Engineering Tricking individuals into giving sensitive information , e.g. by claiming to be from the IT department and asking for their password and username to check for viruses. Virus A virus can replicate itself and spread from system to system by attaching itself to infected files that are then downloaded and opened. Once activated, a virus can modify data or corrupt a system so that it stops working. Q uesto's Q uestions 5.3 - Threats: 1. An IT company is making an information booklet about the different types of online threats . Describe each type of threat: a. Phishing b. Hacking / Data Theft c. Trojan d. Interception e. Eavesdropping f. Social Engineering g. Virus [2 each ] 5.2 - Operational Issues Topic List 5.4 - Physical Security
- 4.3 - Boolean Algebra | OCR A-Level | CSNewbs
Learn about boolean logic and expressions using NOT, AND OR and XOR, Karnaugh maps, Boolean algebra rules including De Morgan’s Laws, distribution, association, commutation and double negation, logic gate diagrams, truth tables, D-type flip flops, half adders and full adders. Based on the OCR H446 Computer Science A-Level specification. Exam Board: OCR A-Level Specification: Computer Science H446 4.3 - Boolean Algebra Watch on YouTube : Boolean Logic (NOT, AND, OR, XOR) Karnaugh maps Boolean algebra rules Logic gate diagrams Truth tables D-type flip flops Half & full adders This topic explores how the logical operations NOT , AND , OR and XOR are used to process binary data and control digital systems . It also looks at how to simplify and represent logic using Karnaugh maps , Boolean algebra rules , logic gate diagrams and truth tables . Boolean Logic Boolean logic is a form of algebra in which all values are either True (1 ) or False (0 ). It’s used in computing and digital circuits to make decisions and control the flow of programs . NOT (negation ) (¬ ) reverses the input value - 1 becomes 0 and 0 becomes 1 . AND (conjunction ) (∧ ) outputs 1 only if both inputs are 1 (e.g. 1 AND 1 = 1 , otherwise 0 ). OR (disjunction ) (v ) outputs 1 if at least one input is 1 (e.g. 1 OR 0 = 1 ). XOR (exclusive disjunction ) (v ) outputs 1 only if one input is 1 but not both (e.g. 1 XOR 1 = 0 , 1 XOR 0 = 1 ). YouTube video uploading soon Karnaugh Maps A Karnaugh map is a visual method used to simplify Boolean expressions and make logic circuits more efficient . It organises all possible input combinations into a grid , where adjacent cells differ by only one bit (following Gray code order ). By grouping together 1s (representing True outputs ) in powers of two (1 , 2 , 4 or 8 cells ), you can identify and remove redundant terms in a Boolean expression . The simplified result reduces the number of logic gates needed in a circuit, making it faster and easier to build . YouTube video uploading soon Boolean Algebra Rules Boolean algebra rules are used to simplify Boolean expressions . De Morgan’s Laws show how to distribute negation across AND and OR operations: ¬(A AND B) = (¬A OR ¬B) and ¬(A OR B) = (¬A AND ¬B) . Distributive Law allows expressions to be expanded or factored , e.g., A AND (B OR C) = (A AND B) OR (A AND C) and vice versa for OR over AND. Associative Law means the grouping of terms doesn’t affect the result . (A AND B) AND C = A AND (B AND C) and (A OR B) OR C = A OR (B OR C) . Commutative Law means the order of terms doesn’t matter in Boolean operations, e.g., A AND B = B AND A and A OR B = B OR A . With Double Negation , two NOTs cancel each other out , returning the original value , e.g., ¬¬A = A . YouTube video uploading soon Logic Gate Diagrams Logic gate diagrams are visual representations of Boolean expressions or digital circuits , showing how data flows through logic gates to produce an output . Each gate performs a basic logical operation (such as NOT , AND , OR or XOR ) and is represented by a distinct symbol . NOT AND OR XOR YouTube video uploading soon Truth Tables A truth table is used to show all possible input combinations for a logic circuit or Boolean expression , along with the resulting output for each combination . Each row in the table represents a unique set of input values (usually 0 for False and 1 for True ). The final column shows the output produced by applying the logical operations to those inputs . The number of rows in a truth table doubles with each additional input , e.g. 4 rows for 2 inputs and 8 rows for 3 inputs . YouTube video uploading soon D-Type Flip Flops A D-type flip-flop i s a sequential logic circuit that stores a single bit of data - either 0 or 1 . It has two inputs , D (data ) and CLK (clock ), and two outputs , Q and ¬Q . When a clock pulse occurs , the flip-flop copies the value of D to the Q output , and that value is held (stored ) until the next clock pulse . This makes D-type flip-flops useful for memory storage , registers and data synchronisation . Essentially, they act as a 1-bit memory cell , storing the last value of D whenever the clock signal triggers . YouTube video uploading soon Half Adders & Full Adders A half adder is a logic circuit with two inputs (A and B ) that are added to produce two outputs - S (sum ), the result of A XOR B - and C (carry ), the result of A AND B . Half adders can only add two bits and cannot handle an input carry from a previous addition . A full adder is an extension of a half adder with three inputs : A , B , and C in (a carry-in from a previous calculation ). It produces two outputs : S (sum ) (A XOR B XOR Cin ) and C out (carry out ) ((A AND B) OR (B AND Cin) OR (A AND Cin) ). Full adders can be linked together to perform multi-bit binary addition in arithmetic circuits. YouTube video uploading soon This page is under active development. Check here for the latest progress update. Q uesto's K ey T erms Boolean Logic: NOT, AND, OR, XOR, Karnaugh maps, logic gate diagrams, truth tables Boolean Algebra Rules: De Morgan’s Laws, distribution, association, commutation, double negation D-Type Flip Flops: data, clock, Q, NOT Q Adders: half adder, full adder D id Y ou K now? The word ' Boolean ' is always spelt with a capital B because it is named after George Boole , a 19th-century English mathematician . His work has become the foundation of all modern digital electronics and computing . 4.2 - Data Structures A-Level Topics 5.1 - Computing Legislation
- 3.3 - Network Topology - Eduqas GCSE (2020 spec) | CSNewbs
Learn about the four network topology types - bus, ring, star and mesh - plus advantages and disadvantages of each. Based on the 2020 Eduqas (WJEC) GCSE specification. 3.3: Network Topology Exam Board: Eduqas / WJEC Specification: 2020 + What is a network topology? Network topology refers to layout of computer systems on a network . Devices in a network topology diagram are often called 'nodes' . What are the different types of network topology? Bus Topology The nodes are connected to a bus (a central cable along which all data is transferred across the network). How it works: Data packets are sent along the main cable (sometimes known as the 'backbone') from the source computer to each other system in turn . Each system checks the destination address of the data packets. If the addresses match then the data is accepted otherwise it is passed on to the next system. Terminators are required at both ends of the bus to mark the end of the cable. 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 the network speed as more systems are attached. The main cable must also be terminated properly . Ring Topology Computer systems are connected together in a single loop . How it works: Packets are transferred around the ring in one direction , passing from one computer system to the next in a loop . As the packets arrive at each computer system, the computer checks the destination address contained in the data packet to see if it matches its own address. If the addresses match the computer accepts and processes the data packet, otherwise it passes it on to the next system. 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 (bandwidth ) 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 Each computer system is connected to a central device , usually a hub or switch . How it works: Each computer system is connected to the central hub or switch and transfers its data packets there. The hub or switch looks at the destination address and transfers the packets directly to the intended computer. 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 full mesh network, each computer system is connected to every other computer system . There is also a partial mesh network where only some nodes (e.g. a printer) are connected to every other node. 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 full 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 . Q uesto's Q uestions 3.3 - Network Topology: 1. Draw and label diagrams of all four topologies . [12 ] 2a. A school currently uses a bus topology but is considering changing to a ring topology . Describe two advantages and two disadvantages of both topologies. [ 8 ] 2b. An office currently uses a star topology but is considering changing to a mesh topology . Describe two advantages and two disadvantages of both topologies. [ 8 ] 3.2 - Data Packets & Switching Theory Topics 3.4 - Network Hardware & Routing
- 8.2 - Understanding Algorithms - Eduqas GCSE (2020 Spec) | CSNewbs
Learn about algorithms including pseudocode and flowcharts. Based on the 2020 Eduqas (WJEC) GCSE specification. 8.2: Understanding Algorithms Exam Board: Eduqas / WJEC Specification: 2020 + What is an algorithm? An algorithm is a set of instructions , presented in a logical sequence . In an exam you may be asked to read and understand an algorithm that has been written. To prove your understanding you may be asked to respond by actions such as listing the outputs of the algorithm, correcting errors or identifying an error within it. Programmers create algorithm designs as a method of planning a program before writing any code. This helps them to consider the potential problems of the program and makes it easier to start creating source code. There are two main methods of defining algorithms : Defining Algorithms - Pseudocode & Flowcharts Pseudocode Pseudocode is not a specific programming language but a more general method of describing instructions . It should be unambiguous, and it should not resemble any particular kind of programming language (e.g. Python or Java), so it can theoretically be turned into working code in any language. Generally, pseudocode can be written in any way that is readable and clearly shows its purpose. However, the Eduqas exam board advises that pseudocode for the programming exam should follow the conventions below : Annotation { Write your comment in curly brackets} Define data type price is integer firstname is string Declare a variable's value set price = 100 set firstname = "Marcella" Input / output output "Please enter your first name" input firstname Selection (must have indentation) if firstname = "Steven" then output "Hello" + firstname elif firstname = "Steve" then output "Please use full name" else output "Who are you?" end if Iteration (while loop) while firstname ! = "Steven" output "Guess my name." input firstname repeat Iteration (for loop) for i in range 10 input item next i Define a subroutine Declare Sub1 [Subroutine content indented] End Sub1 Call a subroutine call Sub1 Flowcharts A flowchart can be used to visually represent an algorithm. The flowchart symbols are: Algorithm Examples Below are two different methods for representing the same algorithm - a program to encourage people to buy items cheaply at a supermarket. The program allows the price of items in a supermarket to be entered until the total reaches 100. The total price and the number of items entered are tracked as the program loops. Once the total reaches 100 or more, an if statement checks how many items have been entered and a different message is printed if there are 20 or more items, 30 or more items or less than 20 items. Pseudocode Flowchart {This is a program to see how many items you can buy in a supermarket before you spend over £100} total is integer, itemsentered is integer, itemprice is integer set total = 0 set itemsentered = 0 while total < 100 output "enter the price of the next item" input itemprice total = total + itemprice itemsentered = itemsentered + 1 repeat if itemsentered >= 20 then output "You are on your way to saving money." elif itemsentered => 30 then output "You're a real money saver." else output "Look for better deals next time." end if Reading Algorithms In an exam you may be asked to read an algorithm and prove your understanding , most commonly by listing the outputs . Start from the first line and follow the program line by line , recording the value of variables as you go . When you encounter a for loop , repeat the indented code as many times as stated in the range . Example Algorithm: Start NewProgram i is integer maxvalue is integer input maxvalue for i = 1 to maxvalue output (i * i) ??????? output 'program finished' End NewProgram Example Questions: 1. List the outputs produced by the algorithm if the 'maxvalue' input is 5 . 2. State the code that has been replaced by '???????' and what the code's purpose is. Example Answers: 1. Outputs: 1 4 9 16 25 program finished 2. Missing Code: next i Purpose: Moves the loop to the next iteration. Watch on YouTube Q uesto's Q uestions 8.2 - Understanding Algorithms: 1a. Read the algorithm shown on the left and list all outputs in the correct order if the inputs are 2 for height and 72 for weight . 1b. Give the code that is missing from line 25 . 8.1 - Programming Principles Theory Topics 8.3 - Writing Algorithms
- 2.4c - Character Storage - OCR GCSE (J277 Spec) | CSNewbs
Learn about the main character sets - ASCII (American Standard Code for Information Interchange) and Unicode. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). 2.4c: Character Storage Exam Board: OCR Specification: J277 Watch on YouTube : Character Sets ASCII Unicode Text File Size What is a Character Set? A character set is a table that matches together a character and a binary value . Each character in a character set has a unique binary number matched with it . Character sets are necessary as they allow computers to exchange data and humans to input characters . Two common character sets are ASCII and Unicode : H = 01001000 ASCII Unicode ASCII (American Standard Code for Information Interchange ) is a common character set which does not take up much memory space . It is important to understand that the number of characters that can be stored is limited by the bits available - ASCII uses 1 byte (8 bits ) which only gives 256 possible characters . This is enough for the English language but it can’t be used for other languages or all punctuation symbols. Unicode is a more popular character set because it uses 2 bytes (16 bits ) that allow for 65,536 possible characters . The extra byte allows many different languages to be represented , as well as thousands of symbols and emojis . However Unicode requires more memory to store each character than ASCII as it uses an extra byte . Character sets are logically ordered . For example, the binary code for A is 01000001 , B is 01000010 and C is 01000011 as the code increases by 1 with each character. The file size of a text file is calculated as shown below: bits per character x number of characters Example: A small text file uses the ASCII character set (which uses 8 bits per character ). There are 300 characters in the file . 300 x 8 = 2,400 bits This could be simplified as 300 bytes or 0.3 kilobytes . File Size of Text Files 01101010 = 256 possible characters 8 bits (1 byte) 1000101101001111 = 65,536 possible characters 16 bits (2 bytes) Q uesto's Q uestions 2.4c - Character Storage: 1. What is a character set and why are they needed ? [ 2 ] 2. Describe 3 differences between ASCII and Unicode . [6 ] 3. The binary code for the character P in ASCII is 01010000 . State what the binary code for the character S would be. [1 ] 4a. A text file uses the ASCII character set and contains 400 characters . What would the file size be in kilobytes ? [ 2 ] 4b. A text file uses the Unicode character set and contains 150 characters . What would the file size be in kilobytes ? [ 2 ] 2.4b - Binary Addition & Shifts Theory Topics 2.4d - Image Storage
- Greenfoot Guide #5 | Play Sounds | CSNewbs
Learn how to play sound files in Greenfoot. Part 5 of the Greenfoot Tutorial for the Eduqas / WJEC GCSE 2016 specification. 5. Play Sounds 1. Check the Sounds Folder Greenfoot Tutorial Sound files must be placed the ' sounds ' folder of your Greenfoot project to be used in the game. In the Component 2 exam of the WJEC / Eduqas 2016 specification , an audio file will be placed in the sounds folder already . For this example game you can download the audio clips to the right and paste them into your sounds folder . Watch on YouTube: Click the audio icon to download a zip folder of the two sound files below . Copy the files into the sounds folder of your Greenfoot project . < Part 4 - Remove Objects 2. Add the playSound Method Add the code to play the sound at the same time as when the collectible object is removed . The name of the file and its extension (e.g. .wav or .mp3 ) must be written in speech marks after the playSound method. Part 6 - The Counter >
- Python | 5b - Sleep | CSNewbs
Learn how to delay processes using the sleep command in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python 5b - Sleep Using Sleep To pause a program, import sleep from the time library . Type the word sleep followed by the number of seconds that you wish the program to break for in brackets . It must be a whole number . Below is an example of a program that imports the sleep command and waits for 2 seconds between printing: from time import sleep print ( "Hello!" ) sleep(2) print ( "Goodbye!" ) You can implement the sleep command within a for loop to produce an effective timer that outputs each second waited to the screen: You could also use a variable instead of a fixed value with the sleep command such as below: from time import sleep for second in range (1,11): print (second) sleep(1) from time import sleep seconds = int ( input ( "How many seconds should I sleep? " )) print ( "Going to sleep..." ) sleep(seconds) print ( "Waking up!" ) Sleep Task ( Slow Calculator) Create a slow calculator program that needs time to think in between calculations. Print a message to greet the user , then wait 3 seconds and ask them to enter a number . Wait another 3 seconds and ask them to enter a second number . Wait 2 more seconds , print “Thinking…” then 2 seconds later print the total of the two numbers added together . Example solution: ⬅ 5a - Rando m 5c - Date & Time ➡
- Cambridge Advanced National in Computing | CSNewbs
An explanation and introduction to the OCR Level 3 Cambridge Advanced National in Computing specification. This certificate (H029) or extended certificate (H129) is an Alternative Academic Qualification (AAQ). Level 3 Alternative Academic Qualification (AAQ) / Cambridge Advanced National In Computing Computing: Application Development Everything you need to know about this course: The Cambridge Advanced National in Computing: Application Development is a new course beginning in September 2025 . It contains both exam and NEA (coursework ) units and focuses on developing software prototypes for applications such as websites , video games and even virtual reality . The video to the left explains all the key details of this new course, but remember, things can change so the OCR website will have the latest updates . Exam Units: Unit F160: Fundamentals of Application Development F160 YouTube Playlist Unit F161: Developing Application Software F161 content is not under current development. If the F160 content is popular, I may work on it in later in the 2025/2026 academic year. These pages are based on content from the OCR Cambridge Advanced National in Computing (AAQ) specification . This website is in no way affiliated with OCR .
- Python | Extended Task 7 | CSNewbs
Test your ability to create a more complex program in Python based on a given scenario. Perfect for students learning GCSE Computer Science in UK schools. Extended Task 7 'Guess the Number' Multiplayer Game A primary school teacher wants to create a fun activity for their students to play when it is raining and they have to stay inside during break and lunch. Five pupils can play the game at once. Each player chooses a number between 1 and 100 . Then a random number is generated. Whoever was furthest from the random number is out of the game . The four remaining players then pick a new number . This continues with one player being removed each round until only one player is left and they are the winner. Add your own flair and additional features to your program as an extension, including preventing the same number being chosen by multiple players . 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 use loops to allow the users to enter their numbers. You may wish to use subroutines to decompose the problem into separate rounds. You will need to import the random library to generate a random number in each round. You will need to compare each number to the randomly selected answer using comparison operators such as > and <. 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: Introduction & Round One Round Two ⬅ Extended Task 6 (Word Game)
- Python | Section 2 Practice Tasks | CSNewbs
Test your understanding of inputs in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python - Section 2 Practice Tasks Task One: Food & Colour Ask a user to input their favourite colour and their favourite food and then print a response using both answers. Requirements for a complete program: Use only one print line. Include both of the user's answers in the print line. Include capital letters, full stops and no irregular spacing in the printed line. Remember: Break up variables in a print line by using commas or plus signs between each part of the "sentence" . Example solutions: What is your favourite colour? green What is your favourite food? cheese Yum! I'll have green cheese for dinner tonight! What is your favourite colour? purple What is your favourite food? ice cream Let's have purple ice cream for breakfast! Task Two: Trivia Question Create a program that asks the user to input an answer to a trivia question of your choice then prints the correct answer with their response too. Requirements for a complete program: Only two lines. Include capital letters, full stops and no irregular spacing in the printed line. Example solution: What is the capital city of Botswana? Windhoek Correct answer: Gaborone. Your answer: Windhoek What is the closest planet to Earth? Mars Correct answer: Mars. Your answer: Mars Task Three: Getting to School Create a program that asks the user how they get to school and how many minutes it takes them (using int ). Then print an appropriate response that uses both variables . Requirements for a complete program: Use only one print line. Include both of the user's answers in the print line. Include capital letters, full stops and no irregular spacing in the printed line. Example solution: How do you get to school? car How many minutes does it take you? 45 Really? It takes you 45 minutes to get here by car? How do you get to school? walking How many minutes does it take you? 20 Really? It takes you 20 minutes to get here by walking? ⬅ 2b - Inputting Numbers 3a - Data Types ➡








