BANA 6620 Quiz 2 - Random + Files

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/8

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 4:38 AM on 9/1/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

9 Terms

1
New cards

What does randient(10,20) produce?

A random integer in the specified range

2
New cards

What does file mode “r” mean?

READ

3
New cards

What does file mode “w” mean?

WRITE

4
New cards

What does file mode “a” mean?

APPEND

5
New cards

open(“data.txt”, “r”)


What are we doing?

Opening data.txt to READ IT

6
New cards

open(“data.txt”, “w”)


What are we doing?

Opening it to WRITE

7
New cards

What does .read() do?


Reads file contents

8
New cards

What does .write() do?

Writes information to a file

9
New cards

What should you do when finished with the file?

file.close()