Class Notes (806,530)
United States (312,111)
CS 1110 (9)
Lecture 1

CS 1110 Lecture 1: November 27 – Writing Files

3 Pages
Unlock Document

University of Virginia
Computer Science
CS 1110

November 27 Writing Files Wednesday, November 29, 2017 10:15 AM Reading files: go into file cabinet and read files CPU: processing and math RAM: stores contents of all variables o Together, these run the code HDD / DISK / Solid State Drive: Disk is like filing cabinet o Keeps what we put in it as long as we leave it in there o Can store things for long times When you read a file, you only get a copy It does not remove it from disk o Disk just makes a copy of disk and puts in into RAM This makes it really safe to open and read files Sending new data to disk: writing o Reading gives you a copy o Writing changes files We will give the files we write a general naming pattern, so as not to override other files Process of Writing Files 1. Open 'w' or open('f.txt', 'w') o This creates file if not there o Opening file for writing causes contents to vanish
More Less

Related notes for CS 1110

Log In


Don't have an account?

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.