Programming 1 Exam 2

Programming 1 Exam 2

18 Qs

quiz-placeholder

Similar activities

Saber vs. Conocer

Saber vs. Conocer

KG - University

20 Qs

Place Value (January Winter 4th 5th Grade Math Kahoot!) Fourth Grade Fifth Grade

Place Value (January Winter 4th 5th Grade Math Kahoot!) Fourth Grade Fifth Grade

KG - University

15 Qs

4.8 Virginia's Natural Resources SOL Review

4.8 Virginia's Natural Resources SOL Review

5th Grade

20 Qs

PAT (PJOK VIII AB)

PAT (PJOK VIII AB)

KG - University

22 Qs

Tomás Carlos Heras García_Curso

Tomás Carlos Heras García_Curso

KG

23 Qs

Digital Signature

Digital Signature

KG - University

13 Qs

ICT Theme 4 Test

ICT Theme 4 Test

5th Grade

15 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?