Programming 1 Exam 2

Programming 1 Exam 2

18 Qs

quiz-placeholder

Similar activities

Progress Test 4 (Unit9, Unit 10, English File, C1)

Progress Test 4 (Unit9, Unit 10, English File, C1)

University

17 Qs

Week 22: Progressive Reforms and War

Week 22: Progressive Reforms and War

5th Grade

18 Qs

Quiz sobre Augusto B. Leguía y la Patria Nueva

Quiz sobre Augusto B. Leguía y la Patria Nueva

12th Grade

15 Qs

Draft Teachers Handbook Quiz

Draft Teachers Handbook Quiz

KG - University

15 Qs

Test 18/3

Test 18/3

University

17 Qs

Quiz II U.6

Quiz II U.6

KG - University

13 Qs

1ere - Overseas

1ere - Overseas

12th Grade

20 Qs

Programming 1 Exam 2

Programming 1 Exam 2

Assessment

Quiz

others

Practice Problem

Hard

Created by

Stephen Franz

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

18 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Which of these is associated with a specific file and provides a way for the program to work with that file?

A file variable
A file extension
A file type
A file object

2.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Which mode specifier will erase the contents of a file if it already exists, and create it if it does not exist?

'r'
'w'
'a'
'b'

3.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

When a file has been opened using the ’r’ mode specifier, which method will return the file’s contents as a string?

readline
read
input
get

4.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What would you use to remove the element of a list at a specific index?

The index method
The remove method
the del statement
the slice method

5.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What would be the value of the variable a_list after the execution of the following code? a_list = [1, 2, 3, 4] a_list[3] = 10

[1, 2, 10, 4]
[10, 10, 10]
[10, 10, 10, 4]
[1, 2, 3, 10]

6.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What method or operator can be used to concatenate lists?

concat
%
*
+

7.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

The primary difference between a tuple and list is:

Once a tuple is created, it cannot be changed
A tuple cannot include lists as elements
A tuple can only include string elements
When creating a tuple, you don’t use commas to separate elements

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?