Python Basics

Python Basics

Professional Development

10 Qs

quiz-placeholder

Similar activities

CyberAnalysis - Дорешивание ВМ по правилам AD

CyberAnalysis - Дорешивание ВМ по правилам AD

Professional Development

12 Qs

Mempersiapkan Komputer dan Paket Program Pengolah Angka

Mempersiapkan Komputer dan Paket Program Pengolah Angka

Professional Development

10 Qs

Python Quiz

Python Quiz

Professional Development

15 Qs

MySQL Webinar

MySQL Webinar

Professional Development

10 Qs

Security+ Study Guide-04 Securing Your Network

Security+ Study Guide-04 Securing Your Network

Professional Development

15 Qs

Chapter 11.1 Windows Desktop and File Explorer

Chapter 11.1 Windows Desktop and File Explorer

KG - Professional Development

10 Qs

BINAR Synergy 6 | Chapter 4

BINAR Synergy 6 | Chapter 4

Professional Development

15 Qs

OWA Part 1

OWA Part 1

Professional Development

8 Qs

Python Basics

Python Basics

Assessment

Quiz

Computers

Professional Development

Medium

Created by

Urvashi Thapar

Used 6+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following code snippets is the correct one for opening the hello.txt file for writing?

output_file = open("hello.txt", "r")

output_file = openFile("hello.txt", "w")

output_file = open("hello.txt", "w")

output_file = File("hello.txt", "w")

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

which mode is used to open a file for exclusive creation?

r

w

x

a

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When you open a file using a with statement, Python will ________ the file automatically after you access it.

close

reset

delete

archive

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator can be used on a pathlib.Path object to extend the path it represents with subdirectories or filenames?

\

/

|

*

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does strip() do?

removes the content of the file

add in meta data

splits the file

Removes extra data at the beginning / end of the string

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

var = = {"apple", "banana", "cherry"}, represents:

sets

dictionary

tuple

list

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

df.shape is used to index, Datatype and Memory information

True

False

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?