JavaScript isn't enabled in your browser, so this file can't be opened. Enable and reload.
Understanding Code Rnd 2 (SP19)
In groups of 2-3, discuss and then answer this form again individually.
For the required email address below, use your
netid@duke.edu
. You will receive a copy of your responses for your records and for future studying.
Sign in to Google
to save your progress.
Learn more
* Indicates required question
Email
*
Your email
LetterCount.py
The output of running the program above is shown below. Which character occurs less often than all others in the file read by the program?
q
z
x
j
Clear selection
If you wanted to change the file read over the Internet by specifying a different URL, what line would you change?
9
10
11
20
Clear selection
A function is...
Any word/identifier that is followed by parentheses is a function call. For example, on line 10 .urlopen(url) is a function call, but .request is not, because .request doesn't have parentheses. On line 13, len(st) is also a function call.
How many function calls are there on line 11?
0
1
2
3
Clear selection
One function in the program determines how many times a single character string occurs in the file read when the program runs/executes. What is the name of this function?
*
print
len
lower
count
Send me a copy of my responses.
Submit
Clear form
reCAPTCHA
Privacy
Terms
This content is neither created nor endorsed by Google.
Report Abuse
-
Terms of Service
-
Privacy Policy
Forms