Computers and Technology

Describe the scope of the variables in this code. class pet:
def __init__(self, strSpecies, strName):
self. species = strSpecies
self. petName = strName

def __str__(self):
return self. species + " named " + self. petName

def changeName(self, newName):
self. petName = newName

class petCarrier:
size = 'medium'
color = 'red'

The scope of petName .

The scope of color is .

Accessible to the entire program
limited to the petCarrier class
limited to the pet class

(both of the blanks need one of those answers)

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 00:00, jahi1201
Ahorse is how much percent more powerful than a pony
Answers: 1
image
Computers and Technology, 23.06.2019 08:00, hernandez09297
What is a scenario where records stored in a computer frequently need to be checked
Answers: 2
image
Computers and Technology, 24.06.2019 10:00, shrafe
Which two technologies support the building of single-page applications?
Answers: 2
image
Computers and Technology, 24.06.2019 12:30, stephanieanaya7
Why does the pc send out a broadcast arp prior
Answers: 1
Do you know the correct answer?
Describe the scope of the variables in this code. class pet:
def __init__(self, strSpecies, s...

Questions in other subjects:

Konu
Mathematics, 02.03.2020 20:59