Programming 1 Exam 2

Programming 1 Exam 2

18 Qs

quiz-placeholder

Similar activities

Agudeza Visual y Refracción

Agudeza Visual y Refracción

University

15 Qs

MFM2P 7.1 - 7.4 REVIEW

MFM2P 7.1 - 7.4 REVIEW

KG - University

20 Qs

quiz ppt

quiz ppt

KG - University

16 Qs

LEY  EDUCATIVA 070

LEY EDUCATIVA 070

KG - University

20 Qs

Introduction à la trigonométrie (cours #1)

Introduction à la trigonométrie (cours #1)

KG - University

15 Qs

EXAMEN B2  S7: SEGUNDA REVOLUCIÓN INDUSTRIAL

EXAMEN B2 S7: SEGUNDA REVOLUCIÓN INDUSTRIAL

KG - University

13 Qs

UNESCO

UNESCO

KG - University

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