Syntax and Usage

Files: Writing to Files

In-class activity 2

Modify the program we just did (see file workWithFiles6.py) to output the squares of the first n positive integers into it, separated by new line character ('\n'), i.e. one value per line.


out.txt

1

4

9

16

25

36