Read our blogs, tips and tutorials
Try our exercises or test your skills
Watch our tutorial videos or shorts
Take a self-paced course
Read our recent newsletters
License our courseware
Book expert consultancy
Buy our publications
Get help in using our site
549 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owl trainers only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Search our website
We also send out useful tips in a monthly email newsletter ...
Software ==> | Python (34 exercises) |
Topic ==> | Files and folders (3 exercises) |
Level ==> | Relatively easy |
Subject ==> | Python training |
This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.
As you grow older, you may want a reminder of some basic facts about yourself to tide you over those senior moments:
Your name
Where you live
A personal detail to help orient yourself
Create a program to generate this file. When you run your program you should get a text file looking something like this:
Obviously your details will be different.
Here's a quick reminder of the main command you'll need:
# open a file for writing
with open(some_file_path,'w') as some_file_name:
When you've got this working, extend your program to read the information back in as a check and then print it out to show who you are, where you live, etc.
First print a message confirming the file was created, and then read it back in and print out each line to get the output shown here.
A reminder of who you are, where you live and what you like doing.
When you've finished close your file, secure in the knowledge that you have a file reminding you of who you are.
Now, where did you put that file?
You can find other training resources for the subject of this exercise here:
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2024. All Rights Reserved.