Arvutiteaduse instituut
  1. Kursused
  2. 2024/25 sügis
  3. Programmeerimise alused (MTAT.03.236)
EN
Logi sisse

Programmeerimise alused 2024/25 sügis

  • Home Page
  • Introduction
  • Expressions
  • Conditional Execution
  • Functions
  • Iterations
  • Strings
  • Files
  • Lists
  • Graphics?
< eelmineTable of Contentsnext >

7.1 WHAT IS A FILE?

Files are used to store data persistently. This means the information in files remains available even after the program that created or modified them has finished running or the computer has been turned off. Files allow us to save our work, share data, and communicate between different programs and systems.

On a high level, we can categorize files into two types - text files and binary files. Text files contain data that is in a human-readable format. They can be opened and edited with a text editor, such as a notepad or a code editor. Examples would be text files .txt and python scripts .py.

Binary files contain data in a format that is not intended to be directly readable by humans. This includes images (.jpg, .png) and executable files (.exe on Windows), to name a few. While you can open a binary file in a text editor, the content will appear as a garbled mess of characters because it represents encoded data that only specific software can correctly interpret.

KEY THINGS TO REMEMBER

  • Files are used to store data persistently, meaning the information remains available even after the program ends or the computer is turned off.
  • Text files contain data in a human-readable format, such as .txt and .py. They can be edited using text editors, such as Notepad.
  • Binary files contain data that is not in a human-readable format, examples include images .jpg and executable files .exe.
< eelmineTable of Contentsnext >

  • Arvutiteaduse instituut
  • Loodus- ja täppisteaduste valdkond
  • Tartu Ülikool
Tehniliste probleemide või küsimuste korral kirjuta:

Kursuse sisu ja korralduslike küsimustega pöörduge kursuse korraldajate poole.
Õppematerjalide varalised autoriõigused kuuluvad Tartu Ülikoolile. Õppematerjalide kasutamine on lubatud autoriõiguse seaduses ettenähtud teose vaba kasutamise eesmärkidel ja tingimustel. Õppematerjalide kasutamisel on kasutaja kohustatud viitama õppematerjalide autorile.
Õppematerjalide kasutamine muudel eesmärkidel on lubatud ainult Tartu Ülikooli eelneval kirjalikul nõusolekul.
Courses’i keskkonna kasutustingimused