subject

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)

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 16:00
This statement accurately describes how headlines should be placed in business documents.
Answers: 3
question
Computers and Technology, 23.06.2019 11:30
Auser is given read permission to a file stored on an ntfs-formatted volume. the file is then copied to a folder on the same ntfs-formatted volume where the user has been given full control permission for that folder. when the user logs on to the computer holding the file and accesses its new location via a drive letter, what is the user's effective permission to the file? a. read b. full control c. no access d. modify e. none of the above
Answers: 1
question
Computers and Technology, 23.06.2019 21:00
Will this setup result in what kathy wants to print?
Answers: 2
question
Computers and Technology, 24.06.2019 20:20
3. write assignment statements that perform the following operations with the variables a, b, and c: a. adds 2 to a and assigns the result to b b. multiplies b times 4 and assigns the result to a c. divides a by 3.14 and assigns the result to b
Answers: 2
You know the right answer?
Describe the scope of the variables in this code. class pet:
def __init__(self, strSpecies, s...
Questions
question
Mathematics, 17.11.2020 20:10
question
Mathematics, 17.11.2020 20:10
Questions on the website: 13722360