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
The discipline of building hardware architectures, operating systems, and specialized algorithms for running a program on a clus
kondaur [170]

The discipline of building hardware architectures, operating systems, and specialized algorithms for running a program on a cluster of processors is known as <u>parallel computing.</u>

<u></u>

<h3>What is Parallel Computing?</h3>

Parallel computing refers to the process of breaking down larger problems into smaller, independent, often similar parts that can be executed simultaneously by multiple processors communicating via shared memory, the results of which are combined upon completion as part of an overall algorithm. The primary goal of parallel computing is to increase available computation power for faster application processing and problem solving.

<h3>Types of parallel computing</h3>

There are generally four types of parallel computing, available from both proprietary and open source parallel computing vendors:

  • Bit-level parallelism: increases processor word size, which reduces the quantity of instructions the processor must execute in order to perform an operation on variables greater than the length of the word.
  • Instruction-level parallelism: the hardware approach works upon dynamic parallelism, in which the processor decides at run-time which instructions to execute in parallel; the software approach works upon static parallelism, in which the compiler decides which instructions to execute in parallel.
  • Task parallelism: a form of parallelization of computer code across multiple processors that runs several different tasks at the same time on the same data.
  • Superword-level parallelism: a vectorization technique that can exploit parallelism of inline code.

Learn more about parallel computing

brainly.com/question/13266117

#SPJ4

5 0
1 year ago
What do you understand by storage devices ? Name any two storage devices.​
MatroZZZ [7]

Answer:

Types of storage devices

Primary Storage: Random Access Memory (RAM) Random Access Memory, or RAM, is the primary storage of a computer. ...

Secondary Storage: Hard Disk Drives (HDD) & Solid-State Drives (SSD) ...

Hard Disk Drives (HDD) ...

Solid-State Drives (SSD) ...

External HDDs and SSDs. ...

Flash memory devices. ...

Optical Storage Devices. ...

Floppy Disks.

6 0
3 years ago
Read 2 more answers
Sarah has to add a picture from her computer file and add a caption to it. Arrange the steps in a correct sequence.
SVEN [57.7K]
Click Insert
click Picture
click From File
select the desired picture and again click insert
right-click the picture
click Insert Caption
write the caption and add it
5 0
3 years ago
Read 2 more answers
When doing a complex presentation, which of the following would be the best tool to begin designing your presentation?
Tomtit [17]

Answer:

B.) Open Office Impress

Explanation:

The options are:

A.) Open Office Writer

B.) Open Office Impress

C.) an outline

D.) photographs

Out of the above, the Impress is used for doing complex presentation, and its one of the best tool for it like PowerPoint. Its quite the same as PowerPoint, and it supports both ppt format as well as odp or the open document presentation format. You can make very complex presentations with the help of the Open office Impress.

7 0
3 years ago
Read 2 more answers
You need to fax a portion of a map from a large hard-cover atlas to a client from an internal fax-modem. To fax the map, the bes
Kay [80]
The fax modem is used to send and receive fax messages by only having phone line (fax machine is not required). The scanned documents should be saved as digital file (image or PDF format) in order to be sent. So, in order to send a portion of a map you should first convert the map into digital file and than simply send it through the fax modem. The best way to convert it to a digital file is to use an optical character recognition (OCR). 
6 0
2 years ago
Other questions:
  • After calling the customer service line of Delta airlines, Francis received an email asking her to fill out customer satisfactio
    9·1 answer
  • I really need help please abari is writing a program which prompts a user for a value without a decimal. Which function should h
    8·1 answer
  • How do headphones work? (From pc)
    8·1 answer
  • Where (what memory location) is the data read from for the following code:
    12·1 answer
  • When was kale discovered?
    9·1 answer
  • Hide Time Remaining A
    11·1 answer
  • List any two programs that are required to play multimedia products
    8·1 answer
  • Write a program that defines an array of integers and a pointer to an integer. Make the pointer point to the beginning of the ar
    12·1 answer
  • In your own words, what is Cryptocurrency?
    15·2 answers
  • Which option will be used to attach email messages ​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!