Letter Revisited¶

Rewrite A Letter to Your Principal, but modify it so that instead of displaying the letter on the screen, it puts it in a file.

When you run your program, it will appear to do nothing. But if you wrote it correctly, it should have created a file in the same directory as your Python program called letter.txt  which you can then view using a text editor.

Name your Python program letter_revisited.py

What You Should See¶

After running your program, we can find and open letter.txt. If you open it, it should look like:

screenshot of letter.txt opened in Notepad


©2021 Daniel Gallo

This assignment is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.

Creative Commons License

Adapted for Python from Graham Mitchell’s Programming By Doing