Search Header Logo
Reading and Writing Files

Reading and Writing Files

Assessment

Presentation

Computers

9th Grade

Easy

Created by

M Waters

Used 3+ times

FREE Resource

26 Slides • 7 Questions

1


Slide image

2

Multiple Choice

What is a subroutine?

1

A set of instructions designed to perform a frequently used operation within a program.

2

A smaller version of a routine.

3

What you call your entire program.

4

A decision made within a program.

3

Multiple Choice

To start my subroutine I need to use:

1

fun

2

sta

3

def

4

go

4

Slide image

5

Slide image

6

Slide image

7

Slide image

8

Slide image

9

Slide image

10

Slide image

11

Slide image

12

Slide image

13

Slide image

14

Multiple Choice

A text file has the file extension of:

1

.pdf

2

.txt

3

.doc

4

.text

15

Slide image

16

Slide image

17

Slide image

18

Slide image

19

Slide image

20

Multiple Choice

The read() function:

1

Reads the file and then deletes the original.

2

Uses your speakers to read the .txt file to you.

3

stores the file in the memory.

4

Converts your file into a string.

21

Slide image

22

Slide image

23

Slide image

24

Multiple Choice

The write mode does:

("w")


myFile = open(“TextFile.txt”, “w”)

1

Will take the contents of your file and write them to the console.

2

Will delete all of your files and replace them with a single new file.

3

Will create a new file. If a file already exists with the same file name it will overwrite the existing one.

4

Will create a new file and if there is an existing file with the same name it will re-name it.

25

Slide image

26

Slide image

27

Slide image

28

Multiple Choice

The Append mode("a") does:

1

Will end the current file deleting it.

2

Creates a new file if none exists with the file name or opens an existing file if a file already exists with that name.

3

Will close all files and open a new one.

4

Will add this file to the end of the last file you had open.

29

Slide image

30

Slide image

31

Slide image



32

Poll

I understand how to read, write and append a text file.

Fully agree.

Mostly agree.

Neither agree or disagree.

Slightly disagree.

Largely disagree.

33

Slide image


Slide image

Show answer

Auto Play

Slide 1 / 33

SLIDE