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
List any 5 Unix commands with their brief description?
AlexFokin [52]

Answer:

Commands: commands are also known as "programs" and the program is a set of rules that performs a specific task which is executed by a computer.

Unix is an operating system. that supports multi-tasking and multi-user functionality. Unix is most widely used in all forms of computing systems such as desktop, laptop, and servers. It provides a Graphical user interface similar to windows.

The Unix operating system there are various commands. The list of five Unix commands can be given as:

1) cal

2) date

3) banner

4) who

5) whoami

1)cal:

The cal command stands for calender. It displays the date.

Syntax:

$ cal

or

$ cal [[month] year]

Example:

$ cal 10 2019

2)date:

The date command stands for date and time. It displays the system date and time.

Syntax:

$date

or

$ date[+format]

Example:

$ date +%d/%m/%y

3) banner

The banner command stands for display the text in to a large size.

Syntax:

$banner message

Example:

$banner Unix

4) who

The who command stands for display the list of users currently logged in.

Syntax:

$who

or

$who [option] … [file][arg1]

Example:

$who

5) whoami

The whoami command stands for display the user id of the currently logged-in user.

Syntax:

$whoami

Example:

$whoami

Explanation:

1)cal command display the current month and year.

2)date command display system date and time.

3)banner command display text in large size.

4)who command display the user name who currently login.

5)whoami command display user id.

4 0
3 years ago
What is the purpose of creating a primary key in a database
ss7ja [257]

Answer:

Basically it creates a unique identifier for each row in your table and that can help you link your table to other tables using primary key as link

Explanation:

"Primary key allows you to create a unique identifier for each row in your table. It is important because it helps you link your table to other tables (relationships) using primary key as links."

7 0
3 years ago
A network utilizes a network access control (NAC) solution to protect against malware. When a wired or wireless host tries to co
Inessa [10]

Answer: Posture assessment

Explanation:

Posture assessment, also refers to posture validation and it is when somw set of rules are applied to the posture data which then gives an assessment of the trust level which can be placed in th e endpoint.

Posture assessment has to do with how the system security is evaluated based on the applications and the settings.

3 0
3 years ago
Create a web page for a fictitious company: Widgets Inc. has hired you to make a mock-up for their new website. They are on a bu
lina2011 [118]

Answer:

.20%

Explanation:

4 0
2 years ago
When did the silent movie era end?<br> A.1919<br> B.1929<br> C.1939<br> D.1949
11111nata11111 [884]

Answer:

The answer is 1929.

5 0
2 years ago
Read 2 more answers
Other questions:
  • What is the biggest disadvantage of copying a worksheet into another workbook?
    13·1 answer
  • How would you say an hard drive works
    9·2 answers
  • Double clicking a word selects the entire word?
    9·2 answers
  • What does media saturation mean?
    15·1 answer
  • What is a Better Computer?<br> A. Alien<br> B. Microsoft<br> C. Windows<br> D. Apple
    11·2 answers
  • 3. The term integration refers to the ability to
    6·1 answer
  • Psychographics may also be called A. personality analytics. B. social group dynamics. C. lifestyle analysis. D. opinion insight.
    6·1 answer
  • In the code snippet below, pick which instructions will have pipeline bubbles between them due to hazards.
    12·1 answer
  • How is peace circulated?​
    7·2 answers
  • A system that receives drawing information from electronic cad files, prepares the printing materials, and controls the size and
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!