CSC1023 Quiz 7

Spring 2012
Herbert J. Bernstein ( )

CSC1023 Quiz 7
Spring 2012

 


This web page is http://www.bernstein-plus-sons.com/.dowling/CSC1023S12/CSC1023_Quiz_7.html
Copyright © 2003-2004, 2010-2012 Herbert J. Bernstein and other parties. All rights reserved.


This is the seventh weekly quiz to be taken on Friday, 30 March 2012 after you have completed the second part of assignment 6. In order to do this quiz, you must use a computer that has Python and IDLE installed. You may use Dowling's computer laboratory computers or you may install Python on your own computer. It should take you approximately half an hour to 2 hours to answer these questions. You may not help one another.

  <==== Do this AFTER you've answered all the questions

You probably DON'T want to do this ===>  

Please fill in the following information:

Name:


Email:

Skype ID:

Please answer the following questions on this form.

  1. Give the URL of your best effort at a python cgi-bin script that will put out your story with at least 2 names substituted.

  2. Give the URLs of your working trivia challenge game and or your own question and answer file.

  3. Explain what plain text files are good for and on what types of machines you can use them.

  4. What do you need to do before you can read from or write to a file?

  5. Give code fragment examples of reading 1 character from a file, 5 characters from a file and 34 characaters from a file.

  6. Explain how to start back at the beginning of a file.

  7. Give code fragment examples of reading 3 characters from the current line, 12 characters from the current line, and the entirety of the characters from the next line.

  8. Explain how to read all the lines from a file with one command.

  9. Give a code fragment example of looping through the lines of a file.

  10. Explain how to open a file for writing. Explain how to write 3 lines to a file with a code fragment.

  11. Suumarize at least 6 file object methods.

  12. Explain the use of a shelf to store picked data.

  13. Explain the try statement witj an except clause, giving a code fragment explaining each line in clear sentences.

  <==== Do this AFTER you've answered all the questions

You probably DON'T want to do this ===>  

Revised 16 March 2012