Help
Contact
For teachers and institutes
Search courses, problems, tests…
A
A
>_
StemPy Lab
Courses ▾
Problems ▾
Practice ▾
Mock Tests
Classes
Groups
Community ▾
A
A
Which line makes an object of the class Dog? | StemPy Lab
Quizzes
/
Which line makes an object of the class Dog?
Python Programming
Easy
High School (11–12)
High School (9–10)
Undergraduate
General
Python Going Further › Classes and Objects
Created by
StemPy Lab
Which line makes an object of the class Dog?
rex = Dog
rex = Dog.make("Rex", 3)
rex = new Dog("Rex", 3)
rex = Dog("Rex", 3)
Check Answer
Log in to save
Tag someone
⚑ Report
← All Quizzes
← class D: species = "dog". a = D() and a.species = "wolf". What is D.species?
A list dogs holds objects with an age attribute, and def age_of(d): return d.age is defined. Which call gives the oldest dog? →
More on
Python Going Further › Classes and Objects
Discussion (0)
Log in
to join the discussion.
Loading…
Problems on this topic
A class Dog has the attributes name and age.
Medium
A class Basket has def __init__(self, items=[]) and self.items = items.
Medium
Class or object attribute?
Medium
Using the BankAccount class of the lesson, add a method transfer(other, amount) that moves money…
Medium
All problems on this topic →