Y10 Python Text Files

Y10 Python Text Files

10th Grade

10 Qs

quiz-placeholder

Similar activities

Bermain Gambar

Bermain Gambar

1st Grade - Professional Development

15 Qs

ASESMEN INFORMATIKAN BAB 1 SERI 2

ASESMEN INFORMATIKAN BAB 1 SERI 2

10th Grade

15 Qs

Xcode and Playgrounds

Xcode and Playgrounds

9th - 11th Grade

9 Qs

Komputer dan Jaringan Dasar Semester 2 - Implementasi dan Analisis Jaringan

Komputer dan Jaringan Dasar Semester 2 - Implementasi dan Analisis Jaringan

10th Grade

10 Qs

TIN 10 - LẦN 1 - STVB 1

TIN 10 - LẦN 1 - STVB 1

10th Grade

10 Qs

KUIZ TING3 KRIPTOGRAFI

KUIZ TING3 KRIPTOGRAFI

1st - 12th Grade

10 Qs

BAB 1 INFORMATIKA

BAB 1 INFORMATIKA

9th - 12th Grade

10 Qs

Microsoft Publisher

Microsoft Publisher

7th - 10th Grade

10 Qs

Y10 Python Text Files

Y10 Python Text Files

Assessment

Quiz

Computers

10th Grade

Practice Problem

Hard

Created by

Roy Duguid

Used 9+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

This command will open MyFile = open("MyText.txt")

To read the file

To append to the file

To write to the file

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

If I want to add to the end of a text file, I should:

MyCipher = open("MyCipher.txt", "w")

MyCipher = open("MyCipher.txt", "a")

MyCipher = open("MyCipher.txt", "w+")

MyCipher = open("MyCipher.txt", "s")

3.

MULTIPLE SELECT QUESTION

20 sec • 1 pt

Which of these will generate an error?

MyCipher.write("writing")

MyCipher..write(writing)

MyCipher.write("writing",writing)

MyCipher.readline()

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

How do you close the file?

MyFile = close()

MyFile.close

close = MyFile()

MyFile.close()

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Why is it best to open a file with with in Python?

It automatically closes the file

Easier to read the code

Better for binary files

Closers to the pseudocode

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which is the best type of loop to write a file in?

While loop

for loop

repeat loop

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What command can you use to separate parts of a line?

separate()

split()

divide()

cut()

Access all questions and much more by creating a free account

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

Already have an account?