Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

More Books

Students also viewed these Databases questions

Question

Describe reviewing applications and rsums.

Answered: 1 week ago

Question

1. Who will you assemble on the team?

Answered: 1 week ago

Question

4. Who would lead the group?

Answered: 1 week ago