Question: 1. Please write the follwing Python 3 program. Also, please show all of the outputs. Paths and File Processing write a program which prints the

1. Please write the follwing Python 3 program. Also, please show all of the outputs.

Paths and File Processing

write a program which prints the full path to all files in the current directory, one per line

write a program which copies a file from a source, to a destination (without using shutil, or the OS copy command)

advanced: make it work for any size file: i.e. dont read the entire contents of the file into memory at once.

This should work for any kind of file, so you need to open the files in binary mode: open(filename, 'rb') (or 'wb' for writing). Note that for binary files, you cant use readline() lines dont have any meaning for binary files.

Test it with both text and binrary files (maybe jpeg or??)

File reading and parsing

In the class repo, in:

Examples/Session01/students.txt

You will find the list I generated in the first class of all the students in the class, and what programming languages they have used in the past.

Write a little script that reads that file, and generates a list of all the languages that have been used.

Extra credit: keep track of how many students specified each language.

If youve got git set up right, git pull upstream master should update your repo. Otherwise, you can get it from gitHub:

https://github.com/UWPCE-PythonCert/IntroPython2016/blob/master/Examples/Session01/students.txt

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!