top of page

Search CSNewbs

289 results found with an empty search

  • Desktop Publishing | CSNewbs

    An overview of what desktop publishing (DTP) is, considerations designer must take and common forms such as posters, leaflets and business cards. Desktop Publishing (DTP) What is DTP? Desktop Publishing (DTP) software allows people to create documents with a mixture of graphics and text . Examples of desktop publishing software are Microsoft Publisher and Serif PagePlus . Desktop publishers can be used to produce documents such as business cards, leaflets, brochures, newspapers, magazines and newsletters . DTP software can be cheap and printers at home are more common these days so people can design and print their own documents. Professional-looking documents can be made simply and without an extensive knowledge of graphic design. The biggest advantage of using DTP is that it is frame based . Text and picture frames can be laid out on the page, and rotated, moved or resized as necessary. It is easy to import images from clip art or the web. The view of the page is known as WYSIWYG (W hat Y ou S ee I s W hat Y ou G et) because the view on the computer will be very similar to what you get when it is printed. What to consider when using DTP Orientation Will your document be landscape or portrait ? Some document types are more commonly one orientation than the other. For example, business cards are generally landscape but newsletters are more often portrait. Size The size of a typical piece of paper is A4. But that is too large for most DTP documents. The larger the number, the smaller the piece of paper . A5 is half the size of A4 and A3 is twice the size of A4. Documents can also be measured in millimetres, for example, an appropriate business card size is 85mm wide and 55mm high. House Style A house style is a set of rules to ensure that each document made by a person or company is part of an identity . To be consistent , each document should use the same logo, titles, colours, graphics and layout . For example, the NHS always uses a blue colour, the same logo and similar layout on each of its documents. Some companies have perfected their house style so that they are synonymous with a single colour - e.g. McDonald's use yellow and Coca-Cola use red and white . DTP Documents Business Cards A business card is a small piece of card that must be simple and stylish . The purpose of a business card is to clearly state the contact details of a person or company. Sharing your business card with other people is one way to promote your business or skills to attract new business partners or customers. A business card must be uncluttered and clearly display relevant contact information, such as an email address, phone number or physical address. Today, business cards may also state social media contacts, such as Facebook pages or Twitter accounts. Flyers A flyer is a small handout that advertises an event or new product. The purpose of a flyer is to clearly and quickly promote an event . It must be eye-catching and to-the-point so that people can immediately understand what it is about. Flyers are often handed out in the street or posted through letterboxes so if it is not clear people will just ignore it. A flyer should use a large title to promote the event, as well as appropriate graphics and information about the date, location and time. It should also contain contact details including a telephone number, website and email address. Posters A poster is a large piece of paper that is put up to advertise an event and display more information than a flyer . Posters should promote an event by using large titles and graphics to clearly describe where the event is taking place, when it is and why people should go. Because there is much more space on a poster than a flyer, additional information can be added and some kind of persuasion to entice passers by to attend. Leaflets A leaflet is a small folded handout that provides more information about an event or new product. The purpose of a leaflet is to give additional details about an event . It can be used before an event to describe the different parts, such as the different acts in a circus or different bands at a festival. It can also be used during an event, such as at a school fair to list the different stalls. Because it is folded over it can display a large amount of information, with both text and graphics . The front of the leaflet should clearly display the purpose of it and the text inside must be readable with images to break up the words. There may also be contact information inside the leaflet, such as directions to a website or social media page .

  • Greenfoot Tutorial | CSNewbs

    A tutorial to understand how to create a game in Greenfoot. A simple step-by-step guide and walkthrough featuring all code needed for the Eduqas GCSE 2016 specification. A Tutorial to Creating a Greenfoot Game Greenfoot Home Greenfoot is software that uses the programming language Java to make simple games. This is called object-orientated programming (OOP ) because objects are coded to interact in a visual environment. Work your way through the following tutorial to create a game similar to one required in the WJEC/Eduqas 2016 specification Component 2 exam . Topic Links: Starting from Scratch & Populating the World Move with Arrow Keys Move Randomly & Bounce on Edge Remove Objects Play Sounds The Counter Extension Ideas According to the 2016 specification, in the Eduqas exam, you will use Greenfoot version 2.4.2 , despite the fact that Greenfoot is now on version 3.6.1 . This means that some newer code won't work! This guide here will work on version 2.4.2 . Just make sure you are also using version 2.4.2 - see the download page for help. Watch on YouTube:

  • 3.4a - Web Technologies | OCR A-Level | CSNewbs

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

  • 3.1 - Data vs Information | Unit 2 | OCR Cambridge Technicals | CSNewbs

    Learn about the technical difference between data and information, with examples. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification for Unit 2 (Global Information). 3.1 - Data vs. Information Exam Board: OCR Specification: 2016 - Unit 2 The terms 'data ' and 'information ' are often used interchangeably but they do not mean the same thing . The term 'data ' refers to unprocessed facts or statistics that have no context . For example, 53% is data - it is a statistic that has no context. The term 'information ' refers to data that has been processed , organised and structured into context . For example, 53% of pumpkin stock was sold in 2019 is information - it is data that has been given context (meaning). Data Processing Information Q uesto's Q uestions 3.1 - Data vs. Information: 1. Describe , using examples , the difference between data and information . [4 ] 2.4 - Information Management 3.2 & 3.3 - Information Categories Topic List

  • 1.2 - CPU Performance - OCR GCSE (J277 Spec) | CSNewbs

    Learn about the three factors that affect computer performance - cache memory, clock speed and the number of cores. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). 1.2: CPU Performance Exam Board: OCR Specification: J277 Watch on YouTube : Clock Speed Cache Memory Number of Cores The performance of a computer system is affected by three main factors: Cache Memory What is cache memory? Cache memory is temporary storage for frequently accessed data . How does cache memory improve performance? Cache memory is closer to the CPU than RAM , meaning that it can provide data and instructions to the CPU at a faster rate . A computer with more cache memory (e.g. 8GB instead of 4GB) should have a higher performance because repeatedly used instructions can be stored and accessed faster . What is the limitation of cache memory? Cache memory is costly, so most computers only have a small amount . Clock Speed What is clock speed? Clock speed is the measure of how quickly a CPU can process instructions . Clock speed is measured in Gigahertz (GHz) . A typical desktop computer might have a clock speed of 3.5 GHz . This means it can perform 3.5 billion cycles a second . How does clock speed improve performance? The faster the clock speed, the faster the computer can perform the FDE cycle resulting in better performance because more instructions can be processed each second . How does overclocking and underclocking affect performance? Default clock speed: 3.5 GHz Underclocking Overclocking 3.9 GHz 3.1 GHz Overclocking is when the computer's clock speed is increased higher than the recommended rate. This will make the computer perform faster, but it can lead to overheating and could damage the machine . Underclocking is when the computer's clock speed is decreased lower than the recommended rate. This will make the computer perform slower but will increase the lifespan of the machine . Number of Cores What is a core? A core is a complete set of CPU components (control unit, ALU and registers). Each core is able to perform its own FDE cycle . A multi-core CPU has more than one set of components within the same CPU. How does the number of cores improve performance? In theory, a single-core processor can execute one instruction at a time , a dual-core processor can execute two instructions, and a quad-core can execute four instructions simultaneously . Therefore, a computer with more cores will have a higher performance because it can process more instructions at once . What are the limitations of having more cores? If one core is waiting for another core to finish processing, performance may not increase at all. Some software is not written to make use of multiple cores , so it will not run any quicker on a multi-core computer. Q uesto's Q uestions 1.2 - CPU Performance: Cache Size & Levels 1a. What is cache memory ? [ 2 ] 1b. Describe two ways that more c ache memory will mean performance is higher . [ 4 ] 1c. Explain why most computers only have a small amount of cache memory. [ 1 ] Clock Speed 2a. What is clock speed ? What is it measured in? [ 2 ] 2b. Explain how a higher clock speed improves performance . [ 2 ] 2c. Explain the terms 'overclocking ' and 'underclocking ' and explain the effects of both on the performance of a computer. [ 4 ] Number of Cores 3a. What is a core ? [ 2 ] 3b. Explain why a quad-core processor should have a higher performance than a dual-core processor . [ 3 ] 3c. Explain two reasons why having more cores doesn't necessarily mean the performance will be better . [ 2 ] 1.1b - Registers & FE Cycle 1.3 - Embedded Systems Theory Topics

  • OCR CTech IT | Unit 1 | 2.3 - Utility Software | CSNewbs

    Learn about different types of utility software including firewall, anti-virus, defragmenter, compressor and backup software. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification. 2.3: Utility Software Exam Board: OCR Specification: 2016 - Unit 1 What is utility software? Utility software are dedicated programs used for the maintenance and organisation of a computer system. Antivirus Software Antivirus software is used to locate and delete viruses on a computer system. The antivirus scans each file on the computer and compares it against a database of known viruses . Files with similar features to viruses in the database are identified and deleted . There are thousands of known viruses but new ones are created each day by attackers so antivirus software must be regularly updated to keep systems secure. Other roles of an antivirus: Checking all incoming and outgoing emails and their attachments . Checking files as they are downloaded . Scanning the hard drive for viruses and deleting them . Firewall A firewall manages incoming and outgoing network traffic . Each data packet is processed to check whether it should be given access to the network by examining the source and destination address . Unexpected data packets will be filtered out and not accepted to the network. Defragmentation As files are edited over time they will become fragmented - this is when the file is split into parts that are stored in different locations on the hard disk drive . Files that are fragmented take longer to load and read because of the distance between the fragments of the file. Defragmentation software is used to rearrange the file on the hard disk drive so that all parts are together again in order. Defragmentation improves the speed of accessing data on the hard disk drive. Compression Compression is used to decrease the size of a file . This is beneficial as more files can be stored on a storage device if the size has been reduced. Compressed files can be transferred faster across a network because they are smaller in size . Monitors, Managers & Cleaners Other roles of a firewall include: Blocking access to insecure / malicious web sites . Blocking certain programs from accessing the internet . Blocking unexpected / unauthorised downloads . Preventing specific users on a network accessing certain files . Monitoring network ports . System monitors check the resources of a computer and display how much CPU time and memory current applications are using. Task managers allow a user to close processes and applications if they have stopped responding or if one is using too many resources. Press Ctrl + Alt + Delete on any Windows computer to open Windows Task Manager which is a system monitor and task manager tool. A disk cleaner is used to scan a hard disk drive and remove unused files . This is used to free up space on the hard drive. A disk scanner will scan a hard disc for any errors and attempt to repair them . Backing Up Data A backup is a copy of data that can be used if the original data is corrupted or lost . Backups of all data should be made regularly and stored in an alternative location . Alternatively, imaging (also known as disk cloning ) creates an identical image of a storage drive to be stored in a different location . Q uesto's Q uestions 2.3 - Utility Software: 1. What is the purpose of utility software ? [1 ] 2a. Describe how antivirus software works. [ 2 ] 2b. Describe 3 further roles of antivirus software . [ 3 ] 3a. What is the purpose of a firewall ? [ 2 ] 3b. Describe 3 further roles of a firewall . [ 3 ] 4a. Describe what is meant by defragmentation . [ 2 ] 4b. Explain why defragmentation software is used . [ 2 ] 5. Describe 2 benefits of using compression . [ 2 ] 6a. Explain why system monitor / task management software could be used . [ 2 ] 6b. Explain the purpose of disk cleaners and disk scanners . [ 2 ] 7a. Explain what a backup is and why they are are important. [ 2 ] 7b. Describe what imaging is. [ 2 ] 2.2 - Applications Software Topic List 2.4 - Operating Systems

  • Python | 9b - Number Handling | CSNewbs

    Learn how to handle numbers in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python 9b - Number Handling Rounding Numbers The round() command is used to round a value to a certain number of decimal places . Type your variable into the round command brackets, add a comma and state the number of decimal places to round to. Fixed Decimal Places (Currency) The round function will remove any trailing 0s , for example 30.1032 will become 30.1 even if you specified to round to 2 decimal places . Instead, you can use an f -string and write :.2f after a bracketed variable to use exactly 2 decimal places . The number can be changed from 2. books = int ( input ( "How many books would you like to buy? " )) total = books * 3.99 print ( f"The total is £ {total:.2f} - Thanks for your order!" ) How many books would you like to buy? 10 The total is £39.90 - Thanks for your order! How many books would you like to buy? 100 The total is £399.00 - Thanks for your order! Practice Task 1 Ask the user to enter any large number. Ask the user to enter another large number. Divide the two numbers and print the answer to 3 decimal places. Example solution: Using Numbers as Strings The following techniques all require the integer to be converted into a string first using the str command. Just like a string, you can shorten a variable to only display a certain length . Remember that Python starts at zero . You can select a specific digit in the same manner as when selecting characters in a string. If you want to use your variable as an integer again later you would need to convert it from a string to an integer using the int command. Again, reversing a number is the same as reversing a string. You can also use other string handling methods such as .startswith() or .endswith() Practice Task 2 Ask the user to enter a 10 digit number. Select the 2nd and 8th digits and add them together. Print the total. Example solution: ⬅ 9a - String Handling Section 9 Practice Tasks ➡

  • 2.3.1a - Object Oriented Programming | OCR A-Level | CSNewbs

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

  • 6.5 - Physical Protection | Unit 2 | OCR Cambridge Technicals | CSNewbs

    Learn about methods of protecting data physically including biometrics, security staff and locks. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification for Unit 2 (Global Information). 6.5 - Physical Protection Exam Board: OCR Specification: 2016 - Unit 2 RFID & Tokens Radio-frequency identification (RFID) uses electromagnetic fields to attach tags to physical objects . RFID tags can be embedded within 'dumb' objects such as clothing, packages and even animals. RFID is used with security tokens (such as an ID keycard ) to permit the access of authorised people to certain areas. RFID can be used by IT companies to track equipment and manage access . Shredding This is the cutting up of documents (paper or CDs ) into small pieces so that they cannot be reassembled and read. Sensitive data on paper or optical disc should be shredded when no longer required. Locks A lock can be used to prevent access to server rooms or sensitive data stores . Only authorised personnel with the right key will have access. Physical Security Measures Backup Backups should be taken regularly and stored at a secure location away from the main site. Backups could also be stored on cloud servers so that any damage to the organisation's building will not affect the backup as well. Biometrics Biometric devices require the input of a human characteristic (such a fingerprint , iris or voice scan ). The biometric data is checked against previously inputted data in a database . A match will allow access to the user. Security Staff Staff may be employed to physically prevent unauthorised people from accessing certain areas of a building where sensitive information is stored. They may check ID keycards or use surveillance like CCTV to monitor who is entering and exiting a secure area. Q uesto's Q uestions 6.5 - Physical Protection: 1. Explain how locks can be used as a physical security method within an organisation. [2 ] 2. Explain what RFID is and how it can be used with tokens as a physical security method. [3 ] 3. Explain how biometric devices can be used as a physical security method. [3 ] 4. Explain how security staff can be employed to protect data. [2 ] 5. What is the purpose of shredding ? [2 ] 6. Why should backups be stored off-site ? [1 ] 6.4 - Protection Measures Topic List 6.6 - Logical Protection

  • 2.4e - Sound Storage - OCR GCSE (J277 Spec) | CSNewbs

    Learn about how sounds are represented in a computer system including how analogue sound waves are converted into binary. Also, learn about sample rate, bit depth, bit rate and metadata. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). 2.4e: Sound Storage Exam Board: OCR Specification: J277 Watch on YouTube : Sample Rate Bit Depth Sound File Size Converting Analogue Sound to Binary Analogue sound waves must be digitally recorded and stored in binary . To record the sound, the amplitude (height ) of the analogue sound wave is measured and recorded in binary at specific intervals . 0010 1011 0101 0101 Analog sound wave ADC (Analog to Digital Converter) Binary sample Sampling an Analogue Sound Wave Digital sampling is discrete (separate) and not continuous like analogue waves. To get the highest quality sound, many samples are taken to recreate the analogue wave as closely as possible . Sample Rate The sample rate (sampling frequency) is the number of times per second the amplitude of the sound wave is measured . It is measured in kilohertz (kHz), for example CD quality is 44.1kHz (44,100 samples per second). The higher the sample rate , the better the audio quality as the digital data more closely resembles an analogue wave . However, higher sample rates result in larger file sizes because more data is stored for each individual sample. A low sample rate will result in a low-quality sound because the digital data does not closely resemble the original analog wave . A higher sample rate will result in a higher-quality sound because the digital data more closely resembles the original analog wave . Bit Depth The bit depth is the number of bits available to represent each sample . For example, a sample with a bit depth of 4 could be 0101 or 0111 or 1010. A sample with a bit depth of 8 could be 01010110 or 1010110 or 11001111. A common bit depth is 16 bits . The higher the bit depth , the more bits are available to be used for each sample. Therefore the quality is often higher as the wave more closely resembles an analog wave . The file size will also be larger if the bit depth is higher, as each sample stores additional bits . low bit rate = lower quality high bit rate = higher quality sound file size = sample rate x bit depth x duration Example: A short audio sample has a bit depth of 4 and a sample rate of 10 samples per second . The clip is 15 seconds long . 4 bits x 10 = 40 bits per second. 40 x 15 = 600 bits . To convert the answer from bits to bytes , divide by 8 . 600 bits ÷ 8 = 75 bytes . Calculating File Size Q uesto's Q uestions 2.4e - Sound Storage: 1. Explain how an analogue sound wave is converted into a binary sample . [ 2 ] 2a. What is a sample rate ? [2 ] 2b. Explain two ways an audio file will be affected if the sample rate is increased . [4 ] 3a. What is bit depth ? [2 ] 3b. Explain two ways an audio file will be affected if the bit depth is increased . [4 ] 4 . An audio sample has a bit depth of 8 , a sample rate of 10 and it is 12 seconds long . What is the file size in bytes ? [ 2 ] 2.4d Image Storage Theory Topics 2.5 - Compression

  • Python | 6a - For Loops | CSNewbs

    Learn how to create and use for loops in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python 6a - For 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 For Loops (1 Range Value) for i in range (5): print ( "This is a loop!" ) This is a loop! This is a loop! This is a loop! This is a loop! This is a loop! for i in range (8): print ( "Jaffa Cakes aren't biscuits" ) Jaffa Cakes aren't biscuits Jaffa Cakes aren't biscuits Jaffa Cakes aren't biscuits Jaffa Cakes aren't biscuits Jaffa Cakes aren't biscuits Jaffa Cakes aren't biscuits Jaffa Cakes aren't biscuits Jaffa Cakes aren't biscuits The i is a count variable , it is used to measure each iteration (turn) of the loop. In the range brackets write the number of times to loop the indented code. Don’t forget the colon at the end and remember that everything you want to repeat must be indented (press tab key once). For Loops Task 1 (Repeat Your Name ) Example solutions (shortened): Create a simple for loop that prints your name twenty times. For Loops Task 2 (Are We There Yet? ) Christopher Christopher Christopher ... Create a simple for loop that prints the sentence 'Are we there yet?' 150 times. Are we there yet? Are we there yet? Are we there yet? ... Counting Using i (2 Range Values) For loops can be used to count by referring to the iteration inside the loop itself using i : for i in range (5): print ( "Loop number" , i) Loop number 0 Loop number 1 Loop number 2 Loop number 3 Loop number 4 for i in range (1,6): print ( "Loop number" , i) Loop number 1 Loop number 2 Loop number 3 Loop number 4 Loop number 5 There are two important things to know about how Python counts using for loops. Python will automatically start counting at 0 rather than 1. The second value in the range is an exclusive limit - it will stop 1 before this value. For example, if you wanted to count 1 to 10 you would need to write range(1,11) . For Loops Task 3 (100 to 150 ) Create a for loop that prints all numbers from 100 to 150 . You don't need to print any additional text, just the i variable. Example solution (shortened): 100 101 102 ... ... 148 149 150 Using a Step (3 Range Values) A third value can be added to the range brackets of a for loop to define a step . A step is the number to go up (or down ) with each iteration . for i in range (2,11,2): print ( i) 2 4 6 8 10 for i in range (18,0,-3): print ( i) 18 15 12 9 6 3 In most programs defining a step is not essential , Python will assume it is +1 if you don't include it. For Loops Task 4 (Even Numbers 10 to 30 ) Example solution for Task 4 (shortened): Create a for loop that prints all even numbers from 10 to 30 . Use a step . For Loops Task 5 (Countdown ) Use a for loop with a negative step to print a countdown from 10 to 1 . 10 12 14 ... ... 26 28 30 Using Variables with For Loops Variables can be used to make for loops suitable for a range of different purposes. loopnum = int ( input ( "Times to repeat: " )) for i in range (loopnum): print ( "Hello!" ) Times to repeat: 4 Hello! Hello! Hello! Hello! The loop above uses a variable in the range brackets to repeat the loop the specific number of times that the user enters . loopnum = int ( input ( "Times to repeat: " )) word = input ( "Word to repeat: " ) for i in range (loopnum): print (word ) Times to repeat: 3 Word to repeat: velociraptor velociraptor velociraptor velociraptor The loop above uses two variables that are input by the user ; one to define the range and another that is printed . For Loops Task 6 (Many Happy Birthdays ) Example solution for Task 6 (shortened): Ask the user to input their age then print 'Happy Birthday! ' that many times. For Loops Task 7 (House Number and Name ) Ask the user to enter their house number (e.g. 15 if they lived at 15 Cherry Road) and their name . Print their name as many times as their house number . For example, if Hannah lived at 103 Apple Lane then Hannah would be printed 103 times . Enter your age: 5 Happy Birthday! Happy Birthday! Happy Birthday! Happy Birthday! Happy Birthday! ⬅ Section 5 Practice Task s 6 b - While Loops ➡

  • Python | Section 5 Practice Tasks | CSNewbs

    Test your understanding of imported commands in Python including random and time. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python - Section 5 Practice Tasks Task One: Random Numbers Ask the user to input 4 different numbers . Put the four variables in a list with square brackets and use the choice command from section 5a to randomly select one. Example solutions: Enter number 1: 10 Enter number 2: 20 Enter number 3: 30 Enter number 4: 40 The computer has selected 30 Enter number 1: 2023 Enter number 2: 2024 Enter number 3: 2025 Enter number 4: 2026 The computer has selected 2026 Task Two: Logging In You will make a program for logging into a system. Print a greeting then ask the user for their name . Wait 2 seconds then print a simple login message with the user’s name . Then print the current time (current hour and minute ). Example solutions: Welcome to Missleton Bank Please enter your name: Steve Steveson Logging you in Steve Steveson The time is 08:02 Welcome to Missleton Bank Please enter your name: Gracie Jones Logging you in Gracie Jones The time is 15:53 Task Three: Random Wait Generate a random number between 3 and 10 to represent seconds . Print this number then print the current hour, minute and second . Wait for the random number of seconds then print the current time again. Example solutions: The random wait will be 6 seconds. The time is 08:17:57 The time is 08:18:03 The random wait will be 3 seconds. The time is 08:21:39 The time is 08:21:42 Task Four: Independence Checker Create a program that displays how many days three specific countries have been independent for. The user will choose either Fiji , Samoa or Australia and the difference between today's date and the day they become independent will be displayed. Fiji became independent on 10th October 1970 . Samoa became independent on 13th December 1962 . Australia became independent on 1st January 1901 . Use the 'Today's Date ' and 'Between Dates ' parts of Section 5c to help you get today's date , make the other three dates and find the difference . Making Samoa's independence date would be samoadate = date(1962,12,13) for example. Example solutions: Enter FIJI, SAMOA or AUSTRALIA to check how long it has been independent for: AUSTRALIA Australia has been independent for 44822 days. Enter FIJI, SAMOA or AUSTRALIA to check how long it has been independent for: FIJI Fiji has been independent for 19338 days. Task Five: Square Root Create a program that asks the user to enter a whole number . Calculate the square root of the number. Round the answer down to the nearest whole number using the floor command. Example solutions: Enter a number: 156 The rounded down square root is 12 Enter a number: 156 The rounded down square root is 12 ⬅ 5e - More Librarie s 6a - For Loops ➡

© CSNewbs 2025

The written, video and visual content of CSNewbs is protected by copyright. © 2025
bottom of page