Python Functions and File Handling Quiz

Python Functions and File Handling Quiz

University

15 Qs

quiz-placeholder

Similar activities

PRETEST P1 DASAR DASAR BAHAN ALAM

PRETEST P1 DASAR DASAR BAHAN ALAM

University

10 Qs

rubiks cube quiz

rubiks cube quiz

KG - Professional Development

13 Qs

PA5 - Resistencia de Materiales (Minas)

PA5 - Resistencia de Materiales (Minas)

University

16 Qs

Be / Past Tense

Be / Past Tense

12th Grade - University

18 Qs

RAPAT TELECONFERENCE

RAPAT TELECONFERENCE

12th Grade - University

10 Qs

Food Safety

Food Safety

University - Professional Development

10 Qs

FINANCIAL MANAGEMENT

FINANCIAL MANAGEMENT

12th Grade - University

20 Qs

KUIS 5,6,7 PEMASARAN FARMASI

KUIS 5,6,7 PEMASARAN FARMASI

University

10 Qs

Python Functions and File Handling Quiz

Python Functions and File Handling Quiz

Assessment

Quiz

Other

University

Practice Problem

Medium

Created by

Mahipal Jadeja

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

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

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What does the return statement do in a function?

Displays output on the console.

Exits the function and returns a value to the caller.

Defines a variable within the function.

Calls another function.

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which function is used to open a file for reading in Python?

open_file()

read()

write()

open()

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What does the seek() function do in file handling?

Closes the file after reading or writing.

Moves the file pointer to a specific position in the file.

Creates a new file with the specified name.

Reads the entire contents of the file.

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which keyword is used to catch exceptions in Python?

try

except

finally

raise

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which keyword is used to define a function in Python?

def

func

define

function

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which function is used to convert a string to an integer in Python?

int()

str()

float()

eval()

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What does the abs() function in Python do?

Converts a value to an absolute integer.

Returns the absolute value of a number.

Calculates the average of a sequence of numbers.

Returns the absolute difference between two numbers.

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?