Intro to classes

Intro to classes

Assessment

Interactive Video

Computers

7th Grade

Practice Problem

Medium

Created by

John Streety

Used 4+ times

FREE Resource

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the 'init' function in a class?

To run the class

To initialize the class attributes

To delete the class

To print messages

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the 'self' keyword represent in a class?

The class itself

A global variable

A function

A local variable

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you call a function within a class?

By using a local variable

By using a global variable

By using the function name only

By using the class name and a period

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What should you do if you encounter a 'missing argument' error?

Add the missing argument

Delete the function

Ignore the error

Restart the program

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the 'talk' function do in the class example?

It prints how many words Jimmy talks per day

It runs a race

It throws a ball

It initializes the class

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?