[Tutor] Seeking help with reading and writing files in Python

David Rock david at graniteweb.com
Sun Jul 8 17:53:27 CEST 2012


* Aristotle <Aristotle at triad.rr.com> [2012-06-26 14:28]:
> 
> The sequence of events that I am using now is to open a program that 
> will gather gallons used from user, call a module to make calculations, 
> use the info from the module to write info to a file named 
> FinalProjectBill.txt.
> 
> After that is done, I open another program that will read the info 
> written to FinalProjectBill.txt
> 
> I guess my confusion about the instructions is, if I should read from 
> one file FinalProjectBill.txt first how does data get written to that 
> file to begin with?

Based on this part, you have already answered your own question.
Specifically, you get your input file, FinalProjectBill.txt, by
collecting data from the user, doing some calculations, and outputting
to the file.

I'm not sure I see the problem. :-(

-- 
David Rock
david at graniteweb.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/tutor/attachments/20120708/0e4558b8/attachment.pgp>


More information about the Tutor mailing list