Search Header Logo

120-140

Authored by Ілияс Тілепалды

Information Technology (IT)

University

120-140
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

How is a method different from a regular function?

Method is inside a class

Method takes self as first parameter

Methods run faster

Functions are always static

2.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

How to add attributes to a class?

Assign in __init__

Use self.attribute = value

Use def keyword

Use import

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is inheritance in Python?

A class deriving from another

Copying a method

Making global variables

Running a loop

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How to override a parent method?

Redefine it in child class

Use override keyword

Use def twice

Use import

5.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

What is the difference between a class and an object?

Class is a blueprint

Object is an instance

Class is data

Object defines a class

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is math.floor(0o10)?

8

10

0

9

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is returned by int(math.pow(3, 2))?

6

9

error, third argument required

error, too many arguments

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?