Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python coding
#1
There are three steps(open,write,close)required for file handling files. You need to write a Python program that executes each of these three steps. Your program must include:
1 Extensive comments to ensure explanation of your code.(1)
2 Open a file (file name must include your student number,thus filexxxxxxxx.txt)
3 Write your name,surname and your date of birth to a file.(1)
4 Close the file
5 Then open the file again.(1)
6 Write the contents of the file to display on screen(1)
Reply
#2
So what's your question?
Reply
#3
What have you tried? We're not big on writing code for people here, but we would be happy to help you fix your code when you run into problems. When you do run into problems, please post your code in Python tags, and clearly explain the problem you are having, including the full text of any errors.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#4
You missed an import step.
(Apr-15-2019, 07:00 PM)Nomathemba Wrote: You need to write a Python program that executes each of these three steps.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020