CSE 102 Exam 3 Practice

Flashcard
•
Computers
•
University
•
Hard
Quizizz Content
FREE Resource
Student preview

15 questions
Show all answers
1.
FLASHCARD QUESTION
Front
What is the correct way to open a file for reading in Python? (Assume there is a variable filename that contains the filename)
Back
with open(filename, 'r') as openFile:
2.
FLASHCARD QUESTION
Front
What is the correct syntax to define a user-defined function in Python? Options: function myFunction():, def myFunction():, create myFunction():, define myFunction():
Back
def myFunction():
3.
FLASHCARD QUESTION
Front
Which of the following is a valid way to create a dictionary in Python? Options: my_dict = {1, 2}, my_dict = [1: 'a', 2: 'b'], my_dict = {'a': 1, 'b': 2}, my_dict = {'a' =1, 'b' = 2}
Back
my_dict = {'a': 1, 'b': 2}
4.
FLASHCARD QUESTION
Front
Which function can be used to skip (and if desired gather) a row in a csv file? Options: next(), skip(), pass(), read()
Back
next()
5.
FLASHCARD QUESTION
Front
How do you read all lines from a text file into a list in Python?
Back
file.readlines()
6.
FLASHCARD QUESTION
Front
What is the correct way to update a value in a dictionary?
Back
7.
FLASHCARD QUESTION
Front
What is the difference between parameters and arguments?
Back
Parameters are the placeholders in the function definition and arguments are the values passed to the function when it is called.
Create a free account and access millions of resources
Similar Resources on Wayground
14 questions
OOP-FLASHCARD FINALS

Flashcard
•
University
9 questions
Java Methods

Flashcard
•
12th Grade
15 questions
Computer Science 1301 Final Questions

Flashcard
•
University
14 questions
RICA Practice-Subtest 2

Flashcard
•
University
15 questions
BA Unit 5, Week 3 Vocabulary

Flashcard
•
KG - University
15 questions
C++ Programming wk 13

Flashcard
•
Professional Development
10 questions
Python Data Structures Essentials

Flashcard
•
University
15 questions
CSE 102 Exam 3 Practice

Flashcard
•
University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade