1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Lana71 [14]
3 years ago
8

Describe the scope of the variables in this code.

Computers and Technology
2 answers:
Solnce55 [7]3 years ago
7 0

Answer:

The scope of petName is local to the class pet.

The scope of color is accessible by all parts of the program.

Explanation:

The variable petName is local to the class, because the variable was created in a function whose name begins with two underscores.

The variable color, while created in the petCarrier class, is accessible to the entire function. It was not created in a function whose name begins with an underscore.

Correct answer edge 2020

tensa zangetsu [6.8K]3 years ago
6 0

Answer:

Scope of petName is only limited to class pet (pet class) and scope of color is accessible to the entire program.

Explanation:

petName is restricted by the contructor with an underscore: def __init__(self,strSpecies,strName):, meaning it cannot be manipulated outside that class and color does not have that.

You might be interested in
¿porque y como surge la informatica y las computadoras
LekaFEV [45]

Answer: La informática es el futuro: un puente hacia todas las cosas útiles.

La informática aprovecha el poder y la posibilidad de la tecnología digital para transformar datos e información en conocimiento que la gente usa todos los días. Este fuerte enfoque en el uso humano de la informática ayuda a las personas a interactuar con la tecnología de la mejor y más eficiente manera posible.

Explanation:

8 0
3 years ago
6.23 Lab training: Unit tests to evaluate your program Auto-graded programming assignments may use a Unit test to test small par
wel

Answer: your mom and dad

Explanation:

3 0
3 years ago
A row-level trigger requires use of the _____ keywords and is executed once for each row affected by the triggering statement.
r-ruslan [8.4K]

Answer:

FOR EACH ROW

--

Hope this Helps!

3 0
3 years ago
Write a list comprehension statement to generate a list of all pairs of odd posi
egoroff_w [7]

Answer:

Print([(a,b) for a in range(10) for b in range(10) if (a < b and a%2 == 1 and b%2 == 1)])

Explanation:

Here, we declared a range of value for a and b using a for loop and the range function. The values are the first 10 numeric digits. The we used the if statement to establish our constraints;

In other to ensure that ;

Lower digit is written first ; (a < b) ;

Only odd numbers are considered,

a%2 == 1 ; b%2 == 1 (remainder when a and b are divided by 2 is 1.

Both a and b are declared as a tuple in other to obtain a pair of odd values.

7 0
3 years ago
What type of account should you use fro signing in to your windows 8 computer if you want to synchronize your settings on other
nikklg [1K]
You should use your Microsoft account because this will sync to all your windows devices.
8 0
3 years ago
Other questions:
  • Ascending and descending are examples of
    5·2 answers
  • How can I sent a message?
    13·1 answer
  • ​this is another name for the wireless configuration in which a central wireless device is used to serve all wireless clients.
    13·1 answer
  • What information should be included in the closing paragraph of a thank-you letter? a. Mention skills that were omitted during t
    6·2 answers
  • The standing toe touch is most likely to result in
    15·1 answer
  • When Gina was 10, she swam in the ocean for the first time. She remembers the feeling of kicking her feet, slicing her arms thro
    12·1 answer
  • Which command can be used to find errors on a hard drive​
    6·1 answer
  • PLEASE HELP I mainly only need the answer for 4.
    5·1 answer
  • C++ Write a program that initially asks a user to enter two positive integer numbers a and b. If either a or are zero or negativ
    9·2 answers
  • Extended essay on globalization not less than 200​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!