File Review What is a File A file
- Slides: 11
File Review
What is a File? A file is a collection of data that is stored on secondary storage like a disk or a thumb drive. Accessing a file means establishing a connection between the file and the program and moving data between the two.
Two Types of Files come in two general types: Text files: files where control characters such as “n” are translated. These are generally human readable Binary files: all the information is taken directly without translation. Not readable and contains non -readable info.
Making and using a File Object file. Object = open(“my. File. txt”, “r”) file. Object. read() Opens the file “my. File. txt” in read-only mode Reads the entire contents of the file as a string and returns it. file. Object. readline() Delivers the next line as a string.
Making and using a File Object file. Object. read. Lines() for line in file. Object: Iterator to go through the lines of a file. Object. write(s) Returns a single list of all the lines from the file. writes the string s to the file. Object. writelines(list) write a list of strings (one at a time) to the file
Making and using a File Object file. Object. close() When done, you close the file.
Spreadsheets The spreadsheet is a very popular, and powerful, application for manipulating data. Its popularity means there are many companies that provide their own version of the spreadsheet. It would be nice if those different versions could share their data…
CSV, Basic Sharing A basic approach to share data is the comma separated value (CSV) format: it is a text format, accessible to all apps each line (even if blank) is a row in each row, each value is separated from the others by a comma (even if it is blank) cannot capture complex things like formula
Typical table in a spreadsheet…
In CSV format Name, Exam 1, Exam 2, Final Exam, Overall Grade Bill, 75. 00, 100. 00, 50. 00, 75. 00 Fred, 50. 00, 50. 00 Irving, 0. 00, 0. 00 Monty, 100. 00, 100. 00 Average, , 56. 25
PA 06 Introduction 11
- File-file yang dibuat oleh user pada jenis file di linux
- Example of inclusion and exclusion criteria
- Chapter review motion part a vocabulary review answer key
- Narrative review vs systematic review
- Writ of certiorari ap gov example
- Nader amin-salehi
- Distributed file system definition
- What does a markup tag tells the web browser
- Difference between logical file and physical file
- In a file-oriented information system, a transaction file
- File sharing management system
- Chapter 9 review stoichiometry