ITC558 | Assignment 4 Programming Principles Quiz | Programming

Home Recent Questions ITC558 | Assignment 4 Programming Principles Quiz | Programming

What statement can be used to handle some of the run-time errors in a program?
a. try/except statement
b. exception handler statement
c. exception statement
d. try statement


Once your program finished writing to a file, it should then close the file. Otherwise -------------- could happen.
a. buffer overflow loss
c. file deletion
d. data appending

Which method could be used to remove specific characters from the end of a string?
a. remove
b. restrip
c. estrip
d. strip

When an existing file is opened, the    mode erases the contents of the file.
a. 'a'
b. 'w'
c. 'x'
d. 'r'

Which method will return an empty string when it has attempted to read beyond the end of a file?
a. getline
b. readline
c. read
d. input

Structured data is sometimes stared as records in files. Each item within a single record is called:
b. section
c. field

Question 7
Consider a try-except-famally structure. Assume that an exception occurs in try block statements, and is handled by except block. When do the statements in famally block execute?
a. Never because exception has been handled 0 After try block and before except block
b. After the exception is handled by except block 0 Before try block
c. Before try block


Assume that the customer file references a file object, and the file was opened using the 'w' mode specifier. How would you write the string 'Mary Smith'- to the file?
a. customer.write('w' , 'Mary Smith')
b. customer. input('Mary Smith' )
c. customer write('Mary Smith' )

Question 9
When a program halts with an exception, it prints a Traceback. What kind of information in provided in the Traceback?
a. line number which caused exception
b. file name containing the problematic code
c. stack of function calls
d. all of the above

A--------------access file is also known as a direct access file.
a. sequential
b. random
c. text
d. numbered

Search Here

Latest Reviews

  • Marcus
    30 Apr, 2019

    My assignment help services are provided in the best way by this website. The writers have completed my assignment in such a way that they helped me increase my overall performance.

  • Emy
    29 Apr, 2019

    Awesome work done by the experts of this company. I visited this site to get math assignment completed. My assignment was complete in every aspect. Thanks to the professionals who provided assignment writing help.

  • Darina
    25 Apr, 2019

    All thanks to the writers of Assignment Help 4 Me who completed my Physics assignment in the right manner. The structure of the assignment was totally customized according to my needs and that too at cheap prices.

View All Reviews


Assignment Help 4 Me