Ask coding questions

← Back to all posts
I need help with coding, how do I do this?
PaulMai (0)

Write a python program to :

FILE READ/WRITE
i) Create a directory named "WeAreTRIO" 
       Go to the created directory
Create a file "test.txt" and add the following text to it.
                   "Nebraska is fast emerging as a key technology player in the Silicon Prairie. We at TRIO STEM Outreach are expanding outside school access for our students through computer programming and hands-on learning opportunities in order to take advantage of promising career opportunities."

ii)  Go to the directory "WeAreTRIO" 
iii) Read the file "test.txt" and print all its content 
iv) Print all its content in UPPERCASE

v) Write the following text at the end of the file.
      "TRIO Summer of Code event offers a five-week intensive coding camp to TRIO high school participants"
vi)  Close the file
      Open the file using browser to confirm the changes got written to the file

FILE ATTRIBUTES
vii) Print the size of the file "test.txt"
viii) Print the last modified date/time of the file "test.txt"
        ( Hint: Use the time module for pretty printing)

ix) Finally delete the file "test.txt" and the directory "WeAreTRIO"
Confirm the file/directory got deleted using browser 

Commentshotnewtop
mwilki7 (278)

What part of that list do you need help with?
You seem to be getting it so far.