Computer Science - 9210 OxfordAQA

Input/output And File Handling

Overzicht

Close a program and everything it was holding disappears. Every variable, every array, every record: gone the instant the process ends, because they lived in memory and memory is handed back. A high score that survives until tomorrow, a register that is still there next term, a saved game: all of them require the program to push its data across a boundary, out of itself and onto something that outlives it.

This lesson covers the three things the specification asks for. Obtaining user input from a keyboard, outputting data and information from a program to the computer display, and reading from and writing to a text file. You will learn why everything typed at a keyboard arrives as text whatever it looks like, how a program knows when a file has run out, and the difference between writing to a file and adding to one, which is the difference between saving today's readings and destroying every reading you ever took.

Doelstellingen

  1. Be able to obtain user input from a keyboard. Be able to output data and information from a program to the computer display. Be able to read/write from/to a text file.

Mindmap

Dit onderwerp is in kaart gebracht zodat je ziet hoe de ideeen samenhangen.

Open de mindmap in de app

Lesnotitie

Everything a program does divides into three regions, and you met them when you learned to read an algorithm. Input is where data crosses into the program from outside. Processing is everything that happens to data the program already holds. Output is where data crosses back out. This topic is about the two crossings, and the specification names four of them: obtaining input from a keyboard, sending output to the computer display, reading from a text file, and writing to a text file.

Volledige lesnotitie beschikbaar in de Green Bridge-app

Installeer de Green Bridge CBT-app op je telefoon of computer voor de volledige IGCSE-bibliotheek: examens uit voorgaande jaren, correctiemodellen, mindmaps, flashcards en audiolessen.

Volledige lesnotities met diagrammen
AI-gestuurde leerassistent
Proefexamens op tijd, nagekeken zodra je klaar bent
Beschikbaar voor Android, Windows, macOS en Linux iOS-app binnenkort beschikbaar

Lesevaluatie

Gefeliciteerd met het voltooien van de les op Input/output And File Handling. Nu je de sleutelconcepten en ideeën, het is tijd om uw kennis op de proef te stellen. Deze sectie biedt een verscheidenheid aan oefeningen vragen die bedoeld zijn om uw begrip te vergroten en u te helpen uw begrip van de stof te peilen.

Je zult een mix van vraagtypen tegenkomen, waaronder meerkeuzevragen, korte antwoordvragen en essayvragen. Elke vraag is zorgvuldig samengesteld om verschillende aspecten van je kennis en kritisch denkvermogen te beoordelen.

Gebruik dit evaluatiegedeelte als een kans om je begrip van het onderwerp te versterken en om gebieden te identificeren waar je mogelijk extra studie nodig hebt. Laat je niet ontmoedigen door eventuele uitdagingen die je tegenkomt; beschouw ze in plaats daarvan als kansen voor groei en verbetering.

  1. What data type does a value obtained from a keyboard have before any conversion? A. Boolean B. Integer C. Real D. String Answer: D
  2. A program opens an existing text file in write mode. What happens to the data already in the file? A. It is kept and new data is added at the end B. It is kept and new data is added at the start C. It is destroyed D. The program refuses to open the file Answer: C
  3. Which loop structure is most appropriate for reading every line of a text file whose length is not known? A. A FOR loop from 0 to the number of lines B. A WHILE loop testing for the end of the file C. A FOR loop from 1 to 100 D. No loop is needed Answer: B
  4. Why should a program close a file it has written to? A. To force any buffered data out to the disk and release the file B. To convert the data into text C. To sort the contents of the file D. To make the file readable by a person Answer: A
  5. A program stores data in a file rather than in an array. What is the main advantage? A. The data can be sorted more quickly B. The data survives after the program ends C. The data does not need to be converted D. The data uses less memory while the program runs Answer: B

Maak deze vragen in de app

Maak deze vragen in de app

Oefen Proefexamenvragen

Wilt u proefexamenvragen over Input/output And File Handling oefenen? Download de Green Bridge CBT-app voor toegang tot proefexamenvragen en volledige oefentoetsen over dit onderwerp.

Download de app in de Google Playstore

Alles wat je nodig hebt om uit te blinken in JAMB, WAEC en NECO.

Green Bridge CBT Mobile App
Persoonlijke AI Leerchat Assistent
Meer dan 200.000 IGCSE-, JAMB-, WAEC- en NECO-examenvragen.
Meer dan 1200 lesnotities
Offline ondersteuning - Leer altijd en overal
Dienstregeling Groene Brug
Literatuursamenvattingen & Potentiële Vragen
Volg je prestaties en vooruitgang.
Diepgaande Uitleg voor Uitgebreid Leren