Python Questions - Read a file
This is collaborative work during class. Work with 1 to 2 other people. Get up and move if you have to so you can work with someone.

Do not fill out early!
Sign in to Google to save your progress. Learn more
This is a Python program you'll be asked questions about. When this Python program runs, it reads a file and stores it in memory, and prints some information about the text stored in the file.
When the program runs, the following output appears on the screen/in a terminal window
total # chars 4345018
number of z's 2073
a 257427
e 408889
i 180213
o 233757
u 82949
The first thing printed when the program runs is total # chars = 4345018. What do you think is the name of the variable that stores the number 4345018? *
The second thing printed is total # z's 2073. What do you think is the name of the function that counts the z's? *
There are seven lines of output. Which of the following explains how those lines are output? *
Do you think that when the program counts/calculates the number of z's, a's, e's, i's, o's, and u's that the program reads/scans the entire text of the file stored in memory and accessed via the variable st? That is, does it scan the entire text six times, once for each of the letters z, a, e, i, o and u?  Or is the text only scanned once by the program rather than six times? Why do you think that? *
How correct do you think this program is? That is how certain are you that it calculates the number of z's from the file correctly, number of e's correctly, etc. *
Names and netids below
Name: first and last of each person, comma separated *
Example: Pat Smith, Connor Jones
netid person 1 *
Example: abc123
netid person 2
netid person 3
netid person 4
Submit
Clear form
Never submit passwords through Google Forms.
This content is neither created nor endorsed by Google. Report Abuse - Terms of Service - Privacy Policy