INST326 HW01

Introduction and Programming Assessment

May 30, 2017

DUE: Tuesday, June 6

1 Introduce Yourself

  1. Come by my office hours and introduce yourself (see syllabus for office hours and location).
  2. Write a short summary of your programming background.
  3. Why are you taking this course?
  4. What do you expect to get out of this course?
  5. What challenges do you anticipate encountering during this course?

2 Python Installation

To ensure you have Python installed and working, please run the following code. Copy and paste the program’s output into a file called hw_01.p02.txt.

 
import hashlib 
 
fname = input("Please Provide Your First Name: ") 
lname = input("Please Provide Your Last Name: ") 
 
mergedName = "%s+%s" % (fname, lname) 
hashedName = hashlib.sha256(mergedName.encode("utf8")).hexdigest() 
 
print("%s,%s" % (mergedName, hashedName))

3 Programming Assessment

High-Level Assignment:
Write a program, in a language of your choice, to read a text file and output the top 10 most common words in the file and their counts.
Requirements:
Your program should satisfy the following requirements.

3.1 Testing

I have provided two text files and the appropriate output for you to use to check your work. File test01_cc_sharealike.txt is a brief overview of the Creative Commons Sharealike license, and test02_the_last_question.txt is a copy of Isaac Asimov’s “The Last Question” short story.

3.1.1 Test 1: Expected Output for test01_cc_sharealike.txt
the 20
work 9
or 8
you 7
to 7
rights 6
of 5
any 5
in 5
license 4

3.1.2 Test 2: Expected Output for test02_the_last_question.txt
the261
of 142
and 123
a 107
to 103
it 73
in 65
was 59
all 53
that 51

4 Submission

All submissions should be uploaded to ELMS subject to the instructions below.