Python Advance Quiz

Python Advance Quiz

Professional Development

10 Qs

quiz-placeholder

Similar activities

Python_R

Python_R

2nd Grade - Professional Development

8 Qs

Python Test 1

Python Test 1

Professional Development

10 Qs

Python

Python

KG - Professional Development

13 Qs

Python to Access Data Quiz

Python to Access Data Quiz

Professional Development

15 Qs

Intro to Python I Quiz

Intro to Python I Quiz

Professional Development

15 Qs

Python

Python

7th Grade - Professional Development

13 Qs

Python Training Day-6 Quiz-6

Python Training Day-6 Quiz-6

Professional Development

10 Qs

IT ENGLISH: Research Project Topics - Python Programming Languag

IT ENGLISH: Research Project Topics - Python Programming Languag

Professional Development

10 Qs

Python Advance Quiz

Python Advance Quiz

Assessment

Quiz

Computers

Professional Development

Medium

Created by

Adam Gijebi

Used 3+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will the output be?

Sound

Bark

None

Error

Answer explanation

Dog overrides Animal's speak() method, so a.speak() calls the one in Dog.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What does this code demonstrate?

Method overloading

Method overriding

Polymorphic inheritance

Encapsulation

Answer explanation

That code demonstrates method overriding and inheritance in object-oriented programming.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What's the result of this execution?

1 then 2

1 then StopIteration

1 then Error

Error at first next()

Answer explanation

When a generator hits a return, it raises StopIteration(return_value). Second next() causes an error unless caught.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will this print?

D B A

D B C A

D C B A

D B C A

Answer explanation

Python uses MRO (Method Resolution Order) — it walks B → C → A.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the df.dropna() method do?

Fills missing values with 0

Drops duplicate values

Removes rows with any missing values

Replaces NaNs with "NA"

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does a Python decorator do?

Makes code more readable

Wraps a function to extend or alter its behavior

Encrypts a function

Converts a function into a method

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the super() function do in Python?

Defines a superclass

Accesses the base class's methods or properties

Returns the name of the superclass

Creates an instance of the parent class

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?