Python-Week7

Python-Week7

University

25 Qs

quiz-placeholder

Similar activities

World Wide Web Quiz

World Wide Web Quiz

University

30 Qs

Section-B MLP LA-1 Quuiz

Section-B MLP LA-1 Quuiz

University

30 Qs

I Year MCQs - C

I Year MCQs - C

University

20 Qs

Research & EBP Descriptive Statistics Review

Research & EBP Descriptive Statistics Review

University

20 Qs

SKEE1103 CT#11a: Pointers & Arrays

SKEE1103 CT#11a: Pointers & Arrays

University

29 Qs

CC104 2nd quiz

CC104 2nd quiz

University

30 Qs

File Types Scavenger Hunt

File Types Scavenger Hunt

University

25 Qs

Design CorelDraw

Design CorelDraw

10th Grade - University

21 Qs

Python-Week7

Python-Week7

Assessment

Quiz

Other

University

Easy

Created by

Yahini Prabha Murugesan

Used 2+ times

FREE Resource

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If a file with the specified name already exists when the file is opened and the file is opened in 'w' mode, then an alert will appear on the screen.

True

False

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The ZeroDivisionError exception is raised when the program attempts to perform the calculation x/y if y = 0.

True

False

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following describes what happens when a piece of data is written to a file?

The data is copied from a variable in RAM to a file.

The data is copied from the program to a file.

The data is copied from a file object to a file.

The data is copied from a variable in the program to a file.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which type of file access jumps directly to a piece of data in the file without having to read all the data that comes before it?

numbered

sequential

text

random

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which mode specifier will open a file but not let you change the file or write to it?

r

w

a

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method could be used to strip specific characters from the end of a string?

strip

lstrip

rstrip

remove

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which statement can be used to handle some of the runtime errors in a program?

an exception handler statement

a try statement

a try/except statement

an exception statement

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?