top of page

Search CSNewbs

286 items found for ""

  • Python | 6b - While Loops | CSNewbs

    top Python 6B - While Loops Types of Loop The third construct of programming (after Sequence and Selection) is Iteration . If you iterate something, then you repeat it. ​ There are two key loops to use in Python: for loops and while loops . ​ A for loop is count controlled – e.g. “For 10 seconds I will jump up and down”. The loop will continue until the count (e.g. 10 seconds) has finished . ​ A while loop is condition controlled – e.g. “While I am not out of breath, I will jump up and down.” The loop will continue until the condition is no longer true . Simple While Loops A while loop keeps repeating until the starting condition has been broken and is no longer true . ​ In the example below, a number will continue to be increased by 1 inside of the loop until it is no longer less than 11, then the loop ends. It is important to give the variable a value before you start the while loop . I have assigned number as 1. ​ The last line increases the number by 1 otherwise the number would stay at 1 and the loop would repeat forever . Practice Task 1 Time to create a simple program using a while loop. Use the example above to help you. ​ Start with a number variable that equals 15. ​ While the number is above 0 print the number and keep taking away 1 each turn. Example solution: Inputs Inside While Loops If you want the user to keep entering an input until they give a certain answer then you need to put the input inside the while loop: I also have put month = ” ” before the loop because Python needs to know the value of the variable before it checks to see if it is not equal to July. I chose a default value of just a blank space so that it does not interfere with the program. ​ That is an important concept. We need to feed Python a default value if we are not going to refer to the variable in the while loop until it is first used inside of the loop (like the month example above). If we are using strings the default value should be a blank space like below: Or if we are using numbers in a while loop then we need to make our variable equal a default value such as 0 before we use it: Practice Task 2 1. Set a variable called total to equal 0. While total is not equal (!=) to 4 ask the user to input a guess for a number between 1 and 10. Make sure that your input line is indented inside of the while loop, not before or after. 2. Set a variable called name to equal ” “. While name is not equal to Iron Man add an input line that asks “Who is Tony Stark better known as?”. Example solution for #1: While True, Continue & Break Typing while True (true must be uppercase) will loop indefinitely . ​ The break command is used to stop the loop . The continue command is used to restart the loop . ​ The example below uses a loop to repeatedly ask the user to select 1, 2 or 3: Entering 1 lets them input a number and then continue (repeats). Entering 2 displays a total and then continues (repeats). Entering 3 will break (stop) the loop. Practice Task 3 Create a while True loop that asks the user to enter a number. Add the number to a total variable and print it. When the total reaches 100 or more, stop the program. Example solution: ⬅ 6a - F or Loops Section 6 Practice Tasks ➡

  • HTML Guide 4 - Hyperlinks | CSNewbs

    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

  • Greenfoot Guide #7 | Extension Ideas | CSNewbs

    7. Extension Ideas Greenfoot Tutorial This concludes the tutorial for a simple Greenfoot game! Try a combination of the suggestions below to add complexity to your game: ​ 1. Make a New Class for 'Bad' Collectibles Create a new subclass in the Actor classes section for a new collectible that will lower the score if picked up. ​ Add code to your main character to remove the collectible when they touch . ​ Add code to decrease the counter by 1 at the same time. 2. Make the Collectibles Move Randomly Copy the code from your enemy class that makes it move randomly and bounce on edge , and paste this into your collectible class . ​ This makes it harder to catch the collectables, especially if there are 'bad' objects to avoid. 3. Stop the Game Go to the code of your enemy and add the line underlined in red within your removal code. ​ This will stop the game if your main character is eaten. 4. Make the Game Multiplayer Create a new subclass in the Actor classes section for a new main character that will be controlled by a second player . ​ Add code to your new character to move it right, down, left and up . ​ Choose different keys for each direction , such as the WASD keys or IJKL keys. ​ If the second player touches a collectible , add code to decrease the score . Multiplayer Rules: Player 1 wins if the final score is above 0 . Player 2 wins if the final score is negative . It is a draw if it finishes on 0 . < Part 6 - The Counter

  • OCR CTech IT | Unit 1 | 2.2 - Applications Software | CSNewbs

    2.2: Applications Software Exam Board: OCR Specification: 2016 - Unit 1 What is applications software? Don't confuse applications software and apps . Apps generally have a single use, such as Angry Birds or the flashlight tool on a phone. ​ Applications Software can be used for a number of different functions depending on the user's needs and their purpose. Productivity Software This is general use software for completing tasks accurately and efficiently . Key examples include word processors (e.g. Microsoft Word or Google Docs), presentation software (e.g. Microsoft PowerPoint or Google Slides) and web browsers (e.g. Microsoft Edge or Google Chrome). ​ Email applications (e.g. Microsoft Outlook or Gmail) are beneficial to organisations because staff can send information to many customers at once which is a simpler and less costly method of communication than something like sending letters or leaflets in the mail. Emails can also include attachments of important documents and include multimedia elements like images and videos to make communication more interesting . Databases and Spreadsheets ​ Database tables and spreadsheets can store both numerical and textual data ready for analysis. Examples include simple database tables and financial spreadsheets of a company's profits this year. Microsoft Access is an example of database software that uses tables and Microsoft Excel is an example of spreadsheet software. Data can be sorted numerically or alphabetically for both software types but graphs can be created from spreadsheets to visualise data . ​ When using spreadsheets (or databases) records can be locked ('record locking' ) so that only one person can make edits at any one time. Edits will be saved before unlocking the file. This will stop data being incorrectly overwritten and will ensure that the data in the spreadsheet is up-to-date, accurate and fit for purpose. ​ An advantage of databases over spreadsheets is that data can be atomised - stored in separate tables but linked through relationships. Development Tools These are tools for programmers who are creating or modifying software . An integrated development environment ( IDE ) is software used to create and edit programs. An IDE features a number of tools including: ​ A translator is a program that converts one type of language into another. A compiler is a type of translator that converts instructions into machine code (binary). A debugger is used to test code and display errors . ​ Other development tools aid programmers with developing and maintaining websites and apps for phones / tablets. Wix.com has been used to create and update this website. Business Software This is specialist software for businesses , often made bespoke for an organisation. One example of business software is design packages such as CAD / CAM (C omputer-A ided D esign / C omputer-A ided M anufacturing). This is the use of software to design and construct products . Workers such as manufacturers and dentists use this type of software. ​ Another type of business software is project management software that allows teams of workers to collaborate and divide projects into manageable tasks. Expert systems use large databases for automatic decision making , such as medical diagnosis programs . Further examples of business software, such as Management Information Systems (MIS), can be found in 3.5 . Q uesto's Q uestions 2.2 - Applications Software: ​ 1. State four different kinds of productivity software and briefly describe how each could be used . For example: "Word processors can be used to type up a letter in an office or write an essay for school." [8 ] ​ 2. Describe two differences between database and spreadsheet software. [2 ] ​ 3a. What is an Integrated Development Environment ? [1 ] 3b. Describe three tools used in an IDE. [6 ] 4. Giving brief examples of how they can be used, state four different types of business software . [8 ] 5. Suggest how a website design company could use each of the three types of applications software (Productivity Software , Development Tools and Business Software ). [ 6 ] 2.1 - Types of Software Topic List 2.3 - Utility Software

  • Python | 5b - Sleep | CSNewbs

    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 ➡

  • 1.1 - Holders of Information | Unit 2 | OCR Cambridge Technicals | CSNewbs

    1.1 - Holders of Information Exam Board: OCR Specification: 2016 - Unit 2 Categories of Information Holders Organisations that store and process information can be put into seven different categories : Business A business will hold information on all of its employees , including their date of birth, address and financial information , allowing them to be paid at the end of each month. Businesses will also hold commercial information about their organisation such as profits and losses, product descriptions and historical data . Many companies may record information about their competitors and general marketing data. Government The government will hold a huge amount of information about all citizens in the country including financial earnings, tax paid, births and deaths . The electoral roll holds information about addresses . A national census is taken every 10 years in the UK (the next census is in 2021) that records extensive data about everyone living in the country. The government also stores information about other countries and shares some of this publicly, such as the Foreign Office posting travel advice . Individual Education Educational organisations , such as schools, colleges and universities will hold information about current and past students as well as staff. Student information such as addresses, attendance records and examination history will be recorded, as well as contact information for parents and guardians. Teacher information will be stored too, as well as students that previously attended the institution, even for a number of years after they have left. An individual will hold information about themselves , either in their head or on paper or electronically. This includes their name, date of birth, address, usernames and passwords . Individuals will store information of others , such as phone numbers, social media details and email addresses . Other information will be about organisations , such as the address of their favourite restaurant, opening hours of the local cinema or the telephone number from a catchy advert. Healthcare Healthcare services , like the NHS in the United Kingdom, will hold entire medical histories for each civilian in the country. This includes basic personal information such as current address and date of birth but much more detailed data too like previous illnesses and operations, blood type, allergies and prescriptions . The data stored by healthcare organisations is usually confidential and should not be shared by anyone other than the citizen in question. Charity & Community Charities may hold financial information of donors who give money to them, as well as information about the different projects that the donations are funding. Charities such as the British Heart Foundation might have physical addresses on the high street so information may be kept about the shops too. Community organisations like sport centres or religious institutions may hold information on members and matches, meetings or events . Comparison of Locations The location of systems and data affects access speed and network quality . ​ The digital divide is the gap between people who do and do not have easy access to computers and networks . Developed vs. Developing Countries Developed countries , like areas of Western Europe, North America and East Asia, have a more developed technology and industry base with more funding available for information infrastructures such as cabling and high-speed access . ​ Developing countries , like areas of Africa and Central Asia, have unstable governments and slower access (if any) to the internet . Less money is spent on technology and improving broadband speed and expensive equipment like computers cannot be purchased on low wages . Urban vs. Rural Urban locations like towns and cities have a high population density . Because there are so many people, councils and IT companies will spend a lot of money on internet infrastructure such as cabling and installing high-speed lines . ​ In Rural locations like the countryside, the population is sparse and settlements may be far apart so internet access is poorer and broadband speeds are slower . This means accessing information on the internet is more difficult . Internet Access from Remote Locations Remote locations (such as the countryside or difficult-to-reach areas like mountains or deserts) might have limited internet access . Fast fixed broadband is expensive to install and many providers simply won't invest in rural areas as it is not economically viable . Some areas, usually those with a very small or temporary population, might have no fixed internet access which will make it difficult for an individual or organisation to communicate or work online. Many remote locations have some form of internet but download speeds will be slow or interrupted due to intermittent connection . This makes it difficult to work online and could take a long time to access webpages or document stores. ​ Alternatives to fixed broadband in remote locations include mobile broadband and satellite broadband . Mobile broadband is generally not designed for home use and would be very expensive for everyday use , plus the remote location will generally mean mobile coverage could also be weak . Satellite broadband requires a dish with an unrestricted view of the sky. Satellite broadband has a relatively high internet speed but will cost a lot to install and has a high latency (more chance of experiencing lag). Q uesto's Q uestions 1.1 - Holders of Information: ​ 1a. State the 7 categories of information holders . [7 ] 1b. For each of the 7 categories , briefly describe 3 different pieces of information that may be stored by the information holder. For example, a charity may store the financial information of donors. [3 each ] ​ 2. What is the digital divide ? [2 ] ​ 3. Describe the differences in information access for the following locations : a. Developed vs. developing countries b. Urban vs. rural areas c. Remote locations [4 each ] Topic List 1.2 - Storage Media

  • 7.1 - Language Levels - Eduqas GCSE (2020 Spec) | CSNewbs

    7.1: Language Levels Exam Board: Eduqas / WJEC Specification: 2020 + There are two types of programming languages used within computer systems: High-Level Languages Why do programmers use high-level languages? ​ H igh-level programming languages use code written in a way that is similar to a natural human language , such as English, making it easier to understand and use the language. ​ Using high-level languages leads to fewer errors and allows for more powerful and complex commands compared to low-level languages. ​ However, a high-level language must be translated into machine code (binary) before it can be run, as high-level languages cannot be executed directly by the CPU . Popular high-level languages: PYT HON C++ Ja v a Visual Basic Low-Level Languages Low-level languages do not closely resemble a natural human language , making it harder for humans to understand and write in. ​ Low-level languages are used when a program must be executed quickly or when programmers need to write code that interacts directly with the hardware , such as device drivers. ​ There are two types of low-level language : Machine Code ​ This is the pure binary code that computers can directly process and execute . ​ It is extremely tedious and difficult for humans to understand and write machine code. ​ However, machine code can be used when a programmer needs to perform a very specific command that can't be done in a high-level language. ​ Machine code will be executed faster than high-level programs because it is already in a format the CPU can execute and does not need to be translated . 0010 1011 0101 0101 0110 0111 0101 0001 0101 0101 0101 0100 1010 1010 1010 1010 1111 1110 0010 1001 0100 1001 0010 0111 0111 0101 0011 1010 1000 0101 0110 0111 0000 1010 1010 0011 1101 1001 0010 1101 0010 0100 1001 0011 1010 1001 0101 0101 0010 0101 0111 0101 0101 1000 1011 0111 Assembly Language ​ Assembly language uses specialised command mnemonics to perform actions . See the Assembly Language section in the programming tab for a list of mnemonics such as INP , OUT and HLT . ​ Assembly language is preferred by many programmers over machine code because it is easier to understand and spot errors . ​ It is faster to execute than high-level languages and, like machine code, can be used to directly control the CPU . Q uesto's Q uestions 7.1 - Language Levels: ​ 1a. Describe three reasons why programmers use high-level languages . [ 3 ] 1b. Explain one limitation of using high-level languages . [2 ] ​ 2a. Describe a key difference between low-level languages and high-level languages . [ 2 ] 2b. Describe when a low-level language would be used instead of a high-level language . [2 ] 2c. Describe an advantage and a disadvantage of writing directly in machine code . [2 ] 2d. Describe what assembly language is. Give one benefit to using assembly language instead of machine code and one benefit to using it instead of a high-level language . [3 ] ​ 3. Compare high-level and low-level languages by stating which is: a. Easier to understand [ 1 ] b. Requiring translation [ 1 ] c. Quicker to execute [ 1 ] INP STA Number1 OUT HLT Number1 DAT 6.2 - Utility Software Theory Topics 8.1 - Programming Principles

  • 3.1 - Network Characteristics - Eduqas GCSE (2020 spec) | CSNewbs

    3.1: Network Characteristics Exam Board: Eduqas / WJEC Specification: 2020 + What is a network? A network is more than one computer system connected together allowing for communication and sharing of resources . There are many benefits but also some drawbacks to using a network compared to having an unconnected ('standalone' ) computer: Advantages of Networks Easily share files , software and hardware between computers. Disadvantages of Networks There is an initial cost because network devices like routers are required . Larger companies will need to buy and maintain a server . Log in from any connected computer and access your data and files. A network manager / administrator might need to be employed to maintain the network . An administrator can monitor network activity and control security settings. Data from computers on the network can be automatically backed up on central storage. Security breaches are more likely and malware , such as worms, can spread quickly across the network. If the web server fails , all connected computers won't be able to access files or log on . Network Types Networks can be split into different types , usually categorised by their geographical distance apart and the area that they serve. Local Area Network A local area network (LAN ) has computer systems situated geographically close together , usually within the same building or small site , like a school or office . Wide Area Network A wide area network (WAN ) has computer systems situated geographically distant to each other, possibly across a country or even across the world . The internet is an example of a WAN that spans the globe. Personal Area Network A PAN is a personal network for an individual , such as a photographer connecting a smartphone, desktop computer and printer together. Metropolitan Area Network A MAN is larger than a LAN but smaller than a WAN and typically covers a relatively large area like a university campus, town or city . Virtual Private Network A VPN allows for a secure and encrypted connection to a public network like the internet. It is often used to protect an individual's privacy by concealing their real location. Wired & Wireless Networks Wired Connections Wireless Connections Wireless connections, such as WiFi or Bluetooth , use no cables but require a wireless network interface card (WNIC ). Wireless connections generally have a slower speed and can be affected by the computer's distance from the wireless router as well as obstacles like walls or bad weather. Wired connections use physical cables , such as copper or fibre optic wires , and require a network interface card (NIC ) to connect to a network. These wired connections use a wired connection protocol - most commonly Ethernet . Restricted Movement Faster More Secure NIC Required Freedom of Movement Slower Less Secure WNIC Required Q uesto's Q uestions 3.1 - Network Characteristics: ​ 1. A retirement home for the elderly is considering installing a LAN , give 3 benefits and 3 drawbacks they might find of using a network . [6 ] ​ 2a. Describe the difference between a LAN and WAN . [2 ] 2b. Give an example of how a LAN and a WAN could each be used . [ 2 ] ​ 3 . Explain the differences between a PAN , MAN and VPN . [ 3 ] ​ 4. For each of the scenarios below, state which network type would be most suitable : a. The IT rooms of a secondary school . [ 1 ] b. A study in a house with a desktop and printer. [ 1 ] c. Using online banking when abroad on a holiday to stay secure . [ 1 ] d. A large technology company with offices across Europe . [ 1 ] e. Council offices with several locations across Manchester . [ 1 ] ​ 5. Briefly compare wired and wireless networks . [ 8 ] 2.2 - Boolean Algebra 3.2 - Data Packets & Switching Theory Topics

  • 4.1c - Signed Binary & Floating Point | OCR A-Level | CSNewbs

    Exam Board: OCR 4.1c - Signed Binary & Floating Point 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 4.1c - Signed Binary & Floating Point: ​ 1. What is cache memory ? [ 2 ] ​ 4.1b - Denary, Binary & Hexadecimal Theory Topics 4.1d - Binary Calculations

  • Python | Extended Task 7 | CSNewbs

    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)

  • 3.1a - Compression | OCR A-Level | CSNewbs

    Exam Board: OCR 3.1a - Compression 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 - Compression: ​ 1. What is cache memory ? [ 2 ] ​ 2.4c - Object-Oriented Language Theory Topics 3.1b - Encryption & Hashing

  • 2.3.1c - Data Structures: Stacks, Queues & Lists | OCR A-Level | CSNewbs

    Exam Board: OCR 3.1c - Data Structures: Stacks, Queues & Lists 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.1c - Data Structures: Stacks, Queues & Lists: ​ 1. What is cache memory ? [ 2 ] ​ 3.1b - Big O Notation Theory Topics 3.1d - Trees & Graphs

bottom of page