Computer Science - 9210 OxfordAQA

Input/output And File Handling

Übersicht

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.

Ziele

  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

Dieses Thema ist als Karte dargestellt, damit die Zusammenhange sichtbar werden.

Mindmap in der App offnen

Lektionshinweis

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.

Vollstaendige Lernnotiz in der Green Bridge App

Holen Sie sich die Green Bridge CBT App auf Handy oder Computer fuer die komplette IGCSE-Bibliothek: fruehere Pruefungen, Bewertungsschemata, Mindmaps, Lernkarten und Audiolektionen.

Vollständige Lernnotizen mit Diagrammen
KI-gestützter Lernassistent
Pruefungssimulationen auf Zeit, sofort nach Abgabe bewertet
Verfügbar für Android, Windows, macOS und Linux iOS-App demnachst verfugbar

Unterrichtsbewertung

Herzlichen Glückwunsch zum Abschluss der Lektion über Input/output And File Handling. Jetzt, da Sie die wichtigsten Konzepte und Ideen erkundet haben,

Sie werden auf eine Mischung verschiedener Fragetypen stoßen, darunter Multiple-Choice-Fragen, Kurzantwortfragen und Aufsatzfragen. Jede Frage ist sorgfältig ausgearbeitet, um verschiedene Aspekte Ihres Wissens und Ihrer kritischen Denkfähigkeiten zu bewerten.

Nutzen Sie diesen Bewertungsteil als Gelegenheit, Ihr Verständnis des Themas zu festigen und Bereiche zu identifizieren, in denen Sie möglicherweise zusätzlichen Lernbedarf haben.

  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

Bearbeiten Sie diese Fragen in der App

Bearbeiten Sie diese Fragen in der App

Übungsklausuren üben

Möchten Sie Übungsklausuren zu Input/output And File Handling üben? Laden Sie die Green Bridge CBT App herunter, um Übungsklausuren und vollständige Prüfungssimulationen zu diesem Thema zu erhalten.

Lade die App im Google Playstore herunter.

Alles, was du brauchst, um in JAMB, WAEC & NECO zu glänzen.

Green Bridge CBT Mobile App
Personalisierter KI-Lern-Chat-Assistent
Über 200.000 Prüfungsfragen für IGCSE, JAMB, WAEC und NECO.
Über 1200 Unterrichtsnotizen
Offline-Unterstützung - Lernen jederzeit und überall
Fahrplan der Grünen Brücke
Literaturzusammenfassungen & Potenzielle Fragen
Verfolgen Sie Ihre Leistung und Ihren Fortschritt
Detaillierte Erklärungen für umfassendes Lernen