Search Header Logo

Test 1 Classes and objects Spring 2023

Authored by Maria D'antone

Computers

11th Grade

Used 5+ times

Test 1 Classes and objects Spring 2023
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

24 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Identify the code that properly creates an instance of a class named Car.

camero.car(make, model)

tesla = car.make()

mustang = Car(make,model)

porsche = car.make.model()

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the keyword to create a class?

import

__int__

class

def

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is a Python class?

A function to create an object.

A template (blueprint) for creating objects.

A procedure related to an object.

A process that repeats are directed.

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

How many objects can be made from a class?  

None, you make classes from objects
one
As many as you want
All of the above

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What choice correctly defines a class called NFL_Player with attributes name and overall.

class NFL_Player:

def __init__(self, name, overall):

self.name = name

self.overall = name

class NFL_Player()

def __init__(self, name, overall):

self.name = name

self.overall = name

class NFL_Player:

def __init__(name, overall):

self.name = name

self.overall = name

class NFL_Player()

def __init__(name, overall):

self.name = name

self.overall = name

I don't know.....

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Why do we make variable or objects global?

So people on any part of the world can see it. Across the flat earth.

Its good practice.

They are temp and only exist inside the function or class that contains them. Therefore accessible anywhere.

Media Image

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Identify the code that properly creates an instance of a class named Car.

camero.car(make, model)

tesla = car.make()

mustang = Car(make,model)

porsche = car.make.model()

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?