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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 22:30, klk597703
Aprovides legal protection for something an individual has created
Answers: 1
image
Computers and Technology, 22.06.2019 22:30, studybug2306
Jason needs to learn a new web tool. he went through his books to understand more about it. now he wants hands-on experience with using that tool. what would him? jason can use websites where workspace is provided to test the results of your code.
Answers: 2
image
Computers and Technology, 23.06.2019 07:00, lin550
Why were most movies from the late 1890s until the early 1930s only filmed in black and white? there were only a few people who could afford the technology to produce color motion pictures back then. audiences did not want color motion pictures until later. the film used to make color motion pictures often overheated, which was a safety hazard, so it was generally not allowed. color films had to be hand-colored, frame by frame.
Answers: 3
image
Computers and Technology, 23.06.2019 14:30, naomi20044
Select the correct answer. andy received a potentially infected email that was advertising products. andy is at risk of which type of security threat? a. spoofing b. sniffing c. spamming d. phishing e. typo-squatting
Answers: 2
You know the right answer?
Describe the scope of the variables in this code. class pet:
def __init__(self, strSpecies, s...

Questions in other subjects:

Konu
Mathematics, 28.08.2020 18:01