Programming 1 Exam 2

Programming 1 Exam 2

18 Qs

quiz-placeholder

Similar activities

PE Unit Test 2

PE Unit Test 2

KG - University

14 Qs

2. ZH Programozási alapok Python

2. ZH Programozási alapok Python

KG - University

15 Qs

Google Slides Features and Terms Quiz

Google Slides Features and Terms Quiz

6th Grade - University

20 Qs

Review 1 ENGLISH 1st Grading

Review 1 ENGLISH 1st Grading

KG - University

20 Qs

8th Grade Fossil Assessment LS4-1

8th Grade Fossil Assessment LS4-1

KG - University

13 Qs

Taxes - Unit Test

Taxes - Unit Test

12th Grade

15 Qs

Programming 1 Exam 2

Programming 1 Exam 2

Assessment

Quiz

others

Hard

Created by

Stephen Franz

FREE Resource

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

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?