CSE 102 Exam 3 Practice

CSE 102 Exam 3 Practice

University

18 Qs

quiz-placeholder

Similar activities

Kuis Ms Excel

Kuis Ms Excel

12th Grade - University

20 Qs

Mengenal Jendela dan Ikon Microsoft Excel

Mengenal Jendela dan Ikon Microsoft Excel

7th Grade - University

15 Qs

PhotoShop CS6

PhotoShop CS6

University

21 Qs

QUIZ 2

QUIZ 2

University

20 Qs

ประกอบคอมพิวเตอร์

ประกอบคอมพิวเตอร์

University

20 Qs

Fun with Computer Architecture

Fun with Computer Architecture

University

15 Qs

Review Quiz (Chapter 3&4)

Review Quiz (Chapter 3&4)

University

20 Qs

C Programming Unit-1 Test-2

C Programming Unit-1 Test-2

University

20 Qs

CSE 102 Exam 3 Practice

CSE 102 Exam 3 Practice

Assessment

Quiz

Computers

University

Medium

Created by

Tyler Lovell

Used 61+ times

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 • 1 pt

What is the correct way to open a file for reading in Python? (Assume there is a variable filename that contains the filename)

open(filename, 'r')

open(filename, 'w')

with open(filename, 'r') as openFile:

with open(filename, 'r')

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to define a user-defined function in Python?

function myFunction():

def myFunction():

create myFunction():

define myFunction():

3.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Media Image

For the following function, what are the parameters? (select all that apply)

val1

val2

val3

val4

val5

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid way to create a dictionary in Python?

my_dict = {1, 2}

my_dict = [1: 'a', 2: 'b']

my_dict = {'a': 1, 'b': 2}

my_dict = {'a' =1, 'b' = 2}

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function can be used to skip (and if desired gather) a row in a csv file.

next()

skip()

pass()

read()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you read all lines from a text file into a list in Python?

file.readlines()

file.read()

file.readlist()

file.read_all()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to update a value in a dictionary?

Media Image
Media Image
Media Image
Media Image

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?