Question: Each Person object has its own last name. True False 2 The initializer method of the Person class is called _ _ init _ _

EachPersonobject has its own last name.
True
False
2
The initializer method of thePersonclass is called__init__.
True
False
3
An object's__str__method is called automatically when an object is printed.
True
False
4
TheDieclass is part of the Python Standard Library.
True
False
5
The maximum number of sides on aDieobject is 20.
True
False
6
If an invalid number of sides is provided when aDieobject is created, a die with 6 sides is created.
True
False
7
What is the output of the following code?
die = Die(6) print('Die value:', die)
Die value: 0
Die value: 1
Die value: 6
A random number from 1 to 6 will be printed.
8
What is the output of the following code?
die = Die(20) die.roll() die.roll() print(die.value)
0
1
20
A random number between 0 and 19.
A random number between 1 and 20.
Check My Quick Check Answers
Terms of Use
Which of the following is an appropriate analogy?
Class: cookie, Object: cookie cutter
Class: house, Object: blueprint
Class: concept of a dog, Object: my dog Fido
Class: score, Object: scoreboard
6
Each object has its own instance data.
True
False

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!