Search CSNewbs
304 results found with an empty search
- 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
- Greenfoot Guide #2 | Arrow Key Movement | CSNewbs
Learn how to edit code in Greenfoot to make objects move using the arrow keys. Use methods such as isKeyDown, setRotation and move. Part 2 of the Greenfoot Tutorial for the Eduqas / WJEC GCSE 2016 specification. Right-click on your main character class and select ' Open editor '. The editor allows you to write different methods - actions that the class can perform. The act() method will repeat whenever the Run button is pressed. 1. Open the Code Editor 2. Movement with the Arrow Keys Greenfoot Tutorial Watch on YouTube: 2. Copy the Code CAREFULLY You need to use an if statement to check if a certain key (like the right arrow key) is being pressed down . An if statement must be contained in standard brackets . After each if statement, the proceeding code must be typed within curly brackets - see the image on the left . Tip - If the brackets are on the same line then use the standard brackets ( and ) If the brackets are on different lines then use curly brackets { and } Your code must be perfect or it won't work. 'Greenfoot ' requires a capital G and the isKeyDown method most be written with a lowercase i but uppercase K and D . When the right arrow key is pressed the object will change its rotation to 0° which is right . It will also move 1 place in this direction. Rotations in Greenfoot: 3. Code the Other Arrow Keys Directly underneath the if statement for turning and moving right, add the code for turning and moving down . You can see in the diagram above the degrees to rotate in each of the four directions . Write the code to move in all four directions. Ensure you have the correct number of brackets or the program won't start. Remember brackets that start and end on the same line are ( ) and brackets over multiple lines are { } . 4. Compile and Run Click the Compile button at the top of the code editor . Then you can go back to the main Greenfoot window and click Run . Press the arrow keys to test your main character moves . Click on me if you've got an error that you're stuck with. < Part 1 - Setup & Populating the World Part 3 - Movement (Random) >
- Python | Extended Task 3 | 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 3 Hi, Susanna here, I want to make a blackjack-like program that I can play for fun at home in between revising for Computer Science. The aim of my blackjack game is to get as close to 21 as possible with the most number of cards, without going over. So... The user can choose whether to be hit with a new card (a number between 1 and 8) or fold and stop. Each number they are dealt adds up to their total . If the total goes over 21, then they lose . If they bust (when over 21) or folded then their final number and their number of cards is displayed . Blackjack 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. Example solution: Helpful reminders for this task: Think about the type of loop that you need. Will you need more than one loop? What variables will you need? Remember to use an input . What will you ask the user? How will you use their response? Remember to use ‘import random’ and randint to create a random number . What outputs do you need and when? What should you display… After each hand? At the beginning? At the end? ⬅ Extended Task 2 (Lottery) Extended Task 4 (Vet Surgery) ➡
- Python | 2a - Inputting Text | CSNewbs
Learn how to input strings (text) in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python 2a - Inputting Text Inputting Text (Strings) in Python A string is a collection of characters (letters, numbers and punctuation) such as: “Wednesday” , “Toy Story 4” or “Boeing 747” . Use the input command to ask a question and let a user input data , which is automatically stored as a string . Variable to save the answer into. Give it a suitable name based on the input. name = input ( "What is your name? " ) = What is your name? Paulina Type your answer directly into the editor and press the Enter key. Statement that is printed to the screen. Leave a space to make the output look clearer. Once an input has been saved into a variable, it can be used for other purposes, such as printing it within a sentence : name = input ( "What is your name? " ) print ( "It is nice to meet you" , name) = What is your name? Jake the Dog It is nice to meet you Jake the Dog Always choose an appropriate variable name when using inputs. colour = input ( "What is your favourite colour? " ) print ( "Your favourite colour is " + colour + "? Mine is yellow." ) = What is your favourite colour? blue Your favourite colour is blue? Mine is yellow. Inputting Text Task 1 ( Holiday) Write an input line to ask the user where they last went on holiday . Write a print line that uses the holiday variable (their answer). Example solution: Where did you last go on holiday? Scotland I hope you had a nice time in Scotland Inputting Text Task 2 ( New Neighbour) Write an input line to ask the user for a title (e.g. Mr, Mrs, Dr). Write another input line for an object . Write a print line that uses both input variables (title and object ). Example solutions: Enter a title: Dr Enter an object: Fridge I think my new neighbour is Dr Fridge Enter a title: Mrs Enter an object: Armchair I think my new neighbour is Mrs Armchair Using a Variable Within an Input To use a variable you have previously assigned a value t o within the input statement you must use + (commas will not work). drink = input ( "What would you like to drink? " ) option = input ( "What would you like with your " + drink + "? " ) print ( "Getting your" , drink , "and" , option , "now...." ) = What would you like to drink? tea What would you like with your tea? biscuits Getting your tea and biscuits now... What would you like to drink? apple juice What would you like with your apple juice? cake Getting your apple juice and cake now... Inputting Text Task 3 ( Name & Game) Ask the user what their name is. Ask the user what their favourite game is. Use their name in the input statement for their game. Print a response with their name and the game they entered. Example solutions: What is your name? Rory Hi Rory, what's your favourite game? Minecraft Rory likes Minecraft? That's nice to know. What is your name? Kayleigh Hi Kayleigh, what's your favourite game? Stardew Valley Kayleigh likes Stardew Valley? That's nice to know. ⬅ Section 1 Practice Ta sks 2b - I nputting Numbers ➡
- Python Editor| CSNewbs
A simple HTML and CSS editor using Code Minrror libraries. Learn how to create simple web pages using HTML. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. Simple HTML & CSS Editor This page is under active development.
- 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 that began 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 YouTube Playlist These pages are based on content from the OCR Cambridge Advanced National in Computing (AAQ) specification .
- HTML Guide 4 - Hyperlinks | CSNewbs
Learn how to link to other websites by using the anchor tag. 4. Hyperlinks HTML Guide Watch on YouTube: A hyperlink is a link to another web page . In this section, you will link your page to a real website, like Wikipedia. Hyperlinks require the anchor tags and Copy a URL Firstly you need to copy the full web address of the web page that you would like to link your page to. Choose an appropriate web page that relates to your chosen topic. Create the Anchor Tag 4. Close the start of the tag . 1. Open the start of the tag . 2. Type href (stands for hypertext reference ). 3. Paste the URL inside speech marks . 5. Type the text you want the user to click on . 6. Time to close the tag . When you save your webpage and run it in a browser you will be able to click highlighted text to open the website you have chosen. Add at least three different hyperlinks to your webpage. Try to add the 2nd & 3rd links without looking at this page - practise makes perfect. Add a Hyperlink within a Sentence You can also create an anchor tag within a sentence. Hyperlinks are important to link webpages together. Next is time for adding pictures! Either change one of your previous hyperlinks to be in the middle of a sentence or create a new one. 3. Text Tags HTML Guide 5. Images
- 2.1 - Data Formats & Types | F161 | Cambridge Advanced National in Computing | AAQ
Learn about data formats such as ASCII, Unicode, CSV, fixed-width, JSON and XML and data types, including Boolean, character, date, integer, real and string. Resources based on Unit F161 (Developing Application Software) for the OCR Cambridge Advanced Nationals in Computing (H029 / H129) AAQ (Alternative Academic Qualification). Qualification: Cambridge Advanced Nationals in Computing (AAQ) Certificate: Computing: Application Development (H029 / H129) Unit: F161: Developing Application Software 2.1 - Data Formats & Types Watch on YouTube : Data Formats Data Types You need to know the characteristics , uses , advantages and disadvantages of six data formats (ASCII , Unicode , CSV , fixed-length , JSON and XML ). You also need to know the characteristics , uses , advantages and disadvantages of six data types (Boolean , character , date , integer , real and string ). What You Need to Know Data Formats ? YouTube video uploading soon Data Types ? YouTube video uploading soon Q uesto's Q uestions 2.1 - Data Formats & Types: 1. What? [2 ] 2. What? [1 ] 3. What? [1 ] 4. What? [1 ] ? D id Y ou K now? 1.3 - Storage Topic List 2.2 - Data Flow
- 11 Graphical User Interface | CSNewbs
Learn how to create and use a simple graphical user interface (GUI) in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. Python 11 - GUI Graphical User Interface In Python, you don’t have just to use a text display; you can create a GUI (Graphical User Interface ) to make programs that look professional. This page demonstrates the basic features of Python’s built-in GUI named tkinter . You can add images, labels, buttons and data entry boxes to develop interactive programs . Hyperlinked sections covered on this page: Setup: Title, Size & Background Creating Elements: Labels, Entry Boxes, Buttons, Images, Message Boxes Displaying Elements: Pack, Place, Grid Inputs & Outputs GUI Tasks Setup Setup: Title, Size & Background Firstly, import the tkinter command and set tkinter.Tk() to a variable such as window . GUI code can be quite complicated with multiple elements so it is sensible to use a comment for each section. Setting the title , size and background colour of your window is optional but can be easily set up at the start of your code. The .geometry() command sets the size of the window. The first number is the width , and the second number is the height . The .configure() command can be used to set the background colour . For a full list of compatible colours, check here . import tkinter #Setting up the Window window = tkinter.Tk() window.title( "Graphical User Interface" ) window.geometry( "400x400" ) window.configure(background = "lightblue" ) import tkinter #Setting up the Window window = tkinter.Tk() window.title( "Example Number Two" ) window.geometry( "300x400" ) window.configure(background = "darkorchid3" ) Creating Elements Creating Elements: Labels, Entry Boxes, Buttons, Radio Buttons, Images, Message Boxes Labels label1 = tkinter.Label(window, text = "Hello there" ) label1 = tkinter.Label(window, text = "Hello there" , fg = "black" , bg = "lightblue" , font = ( "Arial" , 12)) Simple label with default formatting: Label with custom formatting: No elements will appear in your window until you write code to put them there. See the 'Displaying Elements' section further down. Entry (Text) Boxes Simple entry box with default formatting: entry1 = tkinter.Entry(window ) Entry boxes will appear blank , the 'Example Text' shown in the images has been typed in. Entry box with custom formatting: entry1 = tkinter.Entry(window, fg = "blue" , bg = "gray90" , width = 12, font = ( "Arial" ,12)) Buttons The command property of a button is a subroutine that will be called when the button is pressed . The subroutine must be written above the button creation code. def ButtonPress (): #Code here runs when the button is pressed button1 = tkinter.Button(window, text = "Click Me" , fg = "black" , bg = "gold2" , command = ButtonPress) Radio Buttons The Radiobutton element is a multiple-choice option button . A variable needs to be created to track which option has been selected, in this example it is ‘choice ’. Each radio button needs to be linked to the variable and given a unique value (e.g. 0, 1, 2). The radio button with the the value of 0 will be automatically selected when the window opens . Although not shown below, the .set() command can also be used to select a specific radio button , e.g. choice.set(2) . choice = tkinter.IntVar() radio1 = tkinter.Radiobutton(window, text = "Breakfast" , variable = choice, value = 0) radio2 = tkinter.Radiobutton(window, text = "Lunch" , variable = choice, value = 1) radio3 = tkinter.Radiobutton(window, text = "Dinner" , variable = choice, value = 2) Message Boxes You need to import messagebox from tkinter before you can use message boxes . You only need to do this once in your program and it sensible to have it at the very start after you import tkinter (and any other libraries). from tkinter import messagebox tkinter.messagebox.showinfo( "Information" , "Welcome to the program!" ) tkinter.messagebox.showerror( "Error" , "There is a problem with the program." ) if (tkinter.messagebox.askyesno( "Warning" , "Have you understood the instructions?" )) == True : tkinter.messagebox.showinfo( "Warning" , "Thank you for understanding." ) else : tkinter.messagebox.showinfo( "Warning" , "Please read the instructions again." ) Yes / No Message Box Clicking Yes (True ) Clicking No (False ) Images Tkinter supports the image file types .png and .gif . The image file must be saved in the same folder that the .py file is. Resize the image in separate image editing software such as Paint to a specific size . Tkinter does not support all image file types, such as .jpg. Use an application like Microsoft Paint to save an image with a different extension like .png. photo1 = tkinter.PhotoImage(file = "hamster.png" ) photoLabel1 = tkinter.Label(window, image = photo1) An image can be turned into a clickable button rather than a label. def ButtonPress (): #Code here runs when the button is pressed photo1 = tkinter.PhotoImage(file = "hamster.png" ) button1 = tkinter.Button(window, image = photo1, command = ButtonPress) photo1 = tkinter.PhotoImage(file = "hamster.png" ) window.iconphoto( True , photo1) The icon of the window can be changed to an image . Displaying Elements: Pack, Place and Grid Pack .pack() puts the element in the centre of the window, with the next packed element immediately below. window.mainloop() should always be your last line of code in every program, after you have packed, placed or gridded your elements. Displaying Elements labelAdd.pack() buttonAdd.pack() labelMinus.pack() buttonMinus.pack() window.mainloop() Place The .place() command allows an element to be placed in specific coordinates , using x (horizontal ) and y (vertical ) axes. labelAdd.place(x = 25, y = 15) buttonAdd.place(x = 12, y = 35) labelMinus.place(x = 90, y = 15) buttonMinus.place(x = 83, y = 35) window.mainloop() Grid The .grid() command is used to create a grid system to set the row and column . Remember Python starts counting at 0 . You can use padx and pady to add extra space (x is horizontal , y is vertical ). labelAdd.grid(row = 0, column = 0, padx = 10, pady = 5) buttonAdd.grid(row = 1, column = 0, padx = 10) labelMinus.grid(row = 0, column = 1, padx = 10, pady = 5) buttonMinus.grid(row = 1, column = 1, padx = 10) window.mainloop() Inputs & Outputs Inputs and Outputs .config to Change an Element .config() overwrites the property of an element. It can be used with elements such as labels and buttons to change how they appear. label1.config(text = "Warning!" ) The example below (not showing setup and packing) adds 1 to a total variable when the button is pressed . Config is used in two ways: to display the updated total and to change the background of the label to green. def AddOne (): global total total = total + 1 labelTotal.config(text = total, bg = "green" ) total = 0 buttonAdd = tkinter.Button(window, text = "Add" , command = AddOne) Below is a similar program in full that increases or decreases and displays a total when the buttons are pressed . #Setup import tkinter window = tkinter.Tk() total = 0 #Button Presses def AddOne (): global total total = total + 1 labelTotal.config(text = total) def MinusOne (): global total total = total - 1 labelTotal.config(text = total) #Create Elements labelTotal = tkinter.Label(window, text = total, font = ( "Arial" ,14)) buttonAdd = tkinter.Button(window, text = "+" , width = 6, bg = "green" , command = AddOne) buttonMinus = tkinter.Button(window, text = "-" , width = 6, bg = "red" , command = MinusOne) #Display Elements buttonAdd.pack() buttonMinus.pack() labelTotal.pack() window.mainloop() .get to Input a Value .get() returns the value of an element such as an entry box , label or the choice variable if using radio buttons . The value of the element should be stored in a variable so it can be used elsewhere, for example: name = entryName.get() number = int (entryNumber.get()) Use int when getting a value that is an integer : The full program example below checks that the values typed into the username and password entry boxes are correct . Error Messages #Setup import tkinter from tkinter import messagebox window = tkinter.Tk() window.title( "Login" ) #Button Presses def CheckDetails (): username = entryUsername.get() password = entryPassword.get() if username == "Bob Bobson" and password == "cabbage123" : tkinter.messagebox.showinfo( "Success" , "Welcome " + username) else : tkinter.messagebox.showerror( "Invalid ", "Those details are incorrect." ) #Create Elements labelUsername = tkinter.Label(window, text = "Username:" ) labelPassword = tkinter.Label(window, text = "Password" ) entryUsername = tkinter.Entry(window) entryPassword = tkinter.Entry(window) buttonLogin = tkinter.Button(window, text = "Login" , command = CheckDetails) #Display Elements labelUsername.grid(row = 0, column = 0) entryUsername.grid(row = 0, column = 1) labelPassword.grid(row = 1, column = 0) entryPassword.grid(row = 1, column = 1) buttonLogin.grid(row = 2, column = 0) window.mainloop() .bind for Key Presses (& Close Window) .get() will run a specific function when a certain key is pressed. The name of the key must be surrounded by < > brackets and speechmarks . Any associated subroutine of a key bind will need a parameter : event has been chosen and set to None . The code below closes the window using the .destroy() command when the Esc key is pressed. def Close (event = None ): window.destroy() window.bind( "" , Close) The code below will activate the button (and display a message box) by clicking on it but also by pressing the Enter ( Return ) key . def ButtonPress (event = None ): tkinter.messagebox.showinfo( "Success" , "The button was activated" ) button1 = tkinter.Button(window, text = "Press Me" , command = ButtonPress) window.bind( "" , ButtonPress) GUI Tasks GUI Programs to Make Making a program using a GUI can be overwhelming and you must decompose the problem - take it step by step : Import tkinter and create the window (set the title, size and background colour). Create the elements you will need such as labels , buttons and entry boxes . Put the components in the window using pack , place or grid . Write the subroutines for any button presses . These are written at the top of the program after the window setup. Consider your variables - do any need to be set at the start ? Have you made them global if they’re needed within a subroutine ? Put window.mainloop() as the final line of code, only have it once. Use #comments in your code to break up the different sections, the key four sections are shown below. #Setup #Button Presses #Create Elements #Display Elements GUI Task 1 (Random Number Generator ) Generate a random number between 1 and 100 when the button is pressed and display it in a label. Extension idea: Use entry boxes to allow the user to manually input the minimum and maximum value. Example solution: GUI Task 2 (Currency Exchange ) Enter a decimal value and convert it from British pounds to American dollars. You can search for the current exchange rate. Extension idea: Show the conversion rate for other currencies such as Euros and Japanese Yen. Example solution: GUI Task 3 (Random Quote Generator ) Create a list of quotes and use the choice command from the random library to select one to be displayed in a label when the button is clicked. Extension idea: Have a separate text box and button to add more quotes to the list. Example solution: GUI Task 4 (Colour Changer ) When the button is clicked change the background colour of the button with .config to the RGB colour code in the entry box. This should be # followed by 6 hexadecimal values (0-9, A-F). Extension idea: Have an error pop up in a message box if the colour code is incorrect - it must be exactly 7 characters long and start with a hashtag. Example solutions: GUI Task 5 (Class Captain Votes ) Use radio buttons to vote for different candidates in a class vote. Use an if statement when the button is pressed to check which radio button is selected using .get() and the variable you've assigned to the radio buttons ('choice' if you've followed the code in the radio buttons section on this page). Use .config to overwrite a label's value. Remember any variables you want to use in subroutines must be globalised. Extension idea: Stop the count after a certain number - e.g. 30 votes recorded. Example solution: ⬅ Section 10 Practice Tasks 12 - Error Handling ➡
- 3.4 - Stages of Data Analysis | Unit 2 | OCR Cambridge Technicals | CSNewbs
Learn about each of the 8 stages of data analysis including exactly what should occur at every stage. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification for Unit 2 (Global Information). 3.4 - Stages of Data Analysis Exam Board: OCR Specification: 2016 - Unit 2 Data analysis is the process of identifying and collecting data to be viewed and modelled, in the aim of discovering patterns or trends that can be used for conclusions and decision-making. 1. Identify the need Before anything else can take place, objectives are set for what the data analysis will hope to achieve. Aims must be clear and well defined . For example, an organisation should define what information will be needed and what exactly they want to find out by the end of the process (the purpose of the data analysis). Not clearly defining the required information or purpose could lead to worthless results and a waste of the entire data analysis process. 2. Define the scope In this stage the restrictions of the project are defined. Scope includes factors such as budget , content , detail , timescales (deadlines) and any further constraints . 3. Identify potential sources Project planners must identify a wide range of sources for the potential information, ensuring that it is unbiased and covers the objectives . The specific data will depend on the project but it could include sales figures or customer surveys for example. 4. Source and select information Information is gathered from the identified sources in stage three. Any unsuitable data is excluded so that results are not unreliable as poor quality information can lead to numerous negative consequences . Planners will have to determine the accuracy and reliability of any identified sources and select the best . 5. Select the most appropriate tools There are many different data analysis tools that can be used as part of this sequence; in this stage the most appropriate tool for the project is selected. Examples include methods of presentation such as charts and graphs for a visual representation of data . Regression analysis can also be used - regression is the determining of relationships e.g. if the amount spent on advertising bottled water increases, will consumption increase too or are other factors involved? If there is a link, a business can continue to spend more on advertising if consumption and profit also rises. Trend analysis is another option - this shows patterns over time , for example, bottled water consumption each year over the past decade. 6. Process and analyse data Data has now been collected and can be inputted into software such as spreadsheets or databases to further analyse. Putting collected data into a spreadsheet for example allows for analysis to begin as graphs can be created from the data and any patterns or trends discovered. 7. Record and store information The data has been collected and analysed and now any findings are written into a report . Any patterns, trends or findings can be described with statistical evidence generated from the analysis. 8. Share results A report is worthless if not shared with the stakeholders . Sharing can take different forms such as a typed document posted out to stakeholders, an email with major findings summarised or as a post on a website . Q uesto's Q uestions 3.4 - Stages of Data Analysis: 1. List the 8 stages of data analysis in order. [8 ] 2. A supermarket chain called 'Fresh Food UK' wants to complete data analysis to see which stores across the country have been most profitable in the last year . Explain how Fresh Food UK would use each of the 8 stages of data analysis . [16 ] 3.2 & 3.3 - Information Categories Topic List 3.5 - Data Analysis Tools
- Python | Extended Task 1 | 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 1 Pete Porker's Pork Pie Emporium Hello, Pete Porker here... I need a new program for customer orders at my bakery . I need the customer to enter how many scotch eggs (49p each ), pork pies (85p each ) and quiche tarts (£1.45 ) they want to order. Next, ask them to confirm their choice . If they are not happy , ask the questions again . If they confirm their choice, print a receipt showing their order and total . To make your program better, you should use validation (either while loops or error handling ) to make sure that a user must enter a correct value. Bronze Award --- Welcome to Pete Porker's Pork Pie Emporium --- Scotch eggs are 45p, pork pies are 85p and quiche tarts are £1.49. Enter the number of scotch eggs to buy: 9 Enter the number of pork pies to buy: 7 Enter the number of quiche tarts to buy: 4 ----- You selected 9 scotch eggs, 7 pork pies and 4 quiche tarts. 9 scotch eggs = £4.05 7 pork pies = £5.95 4 quiche tarts = £5.96 ------- Total: £15.96 There are many ways to create this program, but below are some suggestions : Use inputs with int to let the user enter how many of each item they want. Use total variables , e.g. totaleggs = eggs * 0.45 to work out the total cost for eggs, pies and tarts. Set a finalcost variable by adding the total of the three items together. Use dashes and \n (which makes a new line ) inside speech marks to make your program more presentable . Silver Award --- Welcome to Pete Porker's Pork Pie Emporium --- Scotch eggs are 45p, pork pies are 85p and quiche tarts are £1.49. Enter the number of scotch eggs to buy: 5 Enter the number of pork pies to buy: 3 Enter the number of quiche tarts to buy: 6 ----- You selected 9 scotch eggs, 7 pork pies and 4 quiche tarts. ----- Are you happy with this selection? no Okay, enter your choices again. Enter the number of scotch eggs to buy: 6 Enter the number of pork pies to buy: 2 Enter the number of quiche tarts to buy: 7 ----- You selected 6 scotch eggs, 2 pork pies and 7 quiche tarts. ----- Are you happy with this selection? yes Excellent! Here is your receipt : 6 scotch eggs = £2.70 2 pork pies = £1.70 7 quiche tarts = £10.43 ------- Total: £14.83 There are many ways to improve this program and below are some suggestions : Use a while loop to repeat the input stage until the user is happy with their choices. You will need to ask the user if they are happy with the values that were entered and then use an if statement to repeat the loop if they enter 'no '. Gold Award Example solution: --- Welcome to Pete Porker's Pork Pie Emporium --- Scotch eggs are 45p, pork pies are 85p and quiche tarts are £1.49. Enter the number of scotch eggs to buy: 9 Enter the number of pork pies to buy: 35 Sorry you must enter a number between 1 and 20. Starting again... Enter the number of scotch eggs to buy: 9 Enter the number of pork pies to buy: 20 Enter the number of quiche tarts to buy: 7 ----- You selected 9 scotch eggs, 20 pork pies and 7 quiche tarts. ----- Are you happy with this selection? YES Excellent! Here is your reciept: 9 scotch eggs = £4.05 20 pork pies = £17.00 7 quiche tarts = £10.43 ------- Total: £31.48 There are many ways to make this program even better and below are some suggestions : Include validation so that the user can only enter numbers between 1 and 20 . You will need to use if statements and the and operator to do this. You can include additional features to your program such as rounding the number to two decimal places and including coloured text using the Colorama library (which will only work if you are using an online editor like Replit ). You can use the .lower() command when checking if the user is happy with their choices to automatically accept 'Yes' and 'YES '. If you really want to challenge yourself you could consider outputting the receipt in order from most expensive to least expensive , using if statements to check the three values (although that has not been done in this example on the left). Helpful reminders for this task: Inputting Integers While Loops Calculations Rounding Integers ⬅ 12 - Error Handling Extende d Task 2 (Lottery) ➡
- 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









