What is the scope of each variable?

class pet:
def __init__(self,strSpecies,strName):
self.species = strSpecies
self.petName = strName

def __str__(self):
return self.species + " named " + self.petName

class petCarrier:
size = 'medium'
color = 'red'

The scope of petName is
.

The scope of color is
.

Answers

Answer 1

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

Answer 2

The scope of petName is local to the class pet. The scope of color is accessible by all parts of the program.

What are variables?

A variable in programming is a value that can change based on external factors or data that has been supplied to the program. A program typically consists of data that it uses while running and instructions that tell the machine what to execute.

Due to the fact that the variable was created in a function with a name that starts with two underscores, petName is local to the class.

Despite being generated in the petCarrier class, the function as a whole can access the variable color. It wasn't produced in a function with an underscore in the name.

Therefore, PetName only affects the class Pet locally. All components of the software have access to the full range of color.

To learn more about variables, refer to the link:

https://brainly.com/question/29988965

#SPJ2


Related Questions

Rank the following storage systems from slowest to fastest:
a. Hard-disk drives
b. Registers
c. Optical disk
d. Main memory
e. Nonvolatile memory
f. Magnetic tapes
g. Cache

Answers

Answer:

Slower = Larger capacity (and vice versa)

Ranked from Slowest to Fastest:

1. magnetic tapes

2. optical disk

3. hard-disk drives

4. nonvolatile memory

5. main memory

6. cache

7. registers

What does the office background allow you to do?

Answers

Answer: Any changes that you make to the Office Background in PowerPoint 365 will be reflected in all other Microsoft Office 365 products on your computer, such as Word, Excel, Outlook, and others. These patterned strips are not activated by default.

You join Mountain Water Co – an expanding bottled water company as an information security officer. The company wants to do a lot of advertising of its bottled water products through its website. The CEO asks you to review the company website and report if it is secure. After talking to the webmaster you find out the following:


The Web server accepts all connections


No authentication is required

Self-registration is allowed

The web server is connected to the Internet

Is the situation secure? Select all that apply.


a.

Yes. There is no threat to a bottled water company so it is secure.


b.

There is insufficient information available to answer this question.


c.

No. Anything that is connected to the Internet is insecure.


d.

No. The system is allowing everyone to register. Only individuals who are associated with the company should be able to register.


e.

No. If there is no authentication, then anyone with access to the website online can access it. For good security only individuals with certain authorized roles should access a website.

Answers

In regards to the above case, My response is c. No. Anything that is connected to the Internet is insecure.

What is meant by computer security?

Computer security is known to be a term that can be called cybersecurity. This is seen as a form of  protection of computer systems as well as information from any kind of harm, theft, as well as any form of unauthorized use.

Note that Computer hardware is seen to be protected by the same ways or methods that one uses to protect other valuable things.

In the above, there is no method of authentication and as such, In regards to the above case, My response is c. No. Anything that is connected to the Internet is insecure.

Learn more about Computer security from

https://brainly.com/question/25720881

#SPJ1

A computer is experiencing network connectivity issues; what step would you NOT attempt to solve the problem?

Answers

Answer:

A step I wouldn't take is throwing the computer in the trash and lighting my house on fire.

Explanation:

list any three specification technology​

Answers

Answer:

descriptive, performance and detailed.

Bad Directions You are driving to your friend’s house and are using your smartphone for directions. While approaching your destination, you realize that your smartphone app instructed you to turn the wrong way on your friend’s street. How could this have happened?

Answers

This could have happened when:

Lack of Internet service or failureWrong application.What do you mean by Internet?

The Internet is seen as a form of a network that helps people to  connects their computers all over the nation.

In this age,  Through the help of the Internet, people are able to  share information and navigate through places.

Note that the problem of bad direction could have happened when:

Lack of Internet service or failureWrong application.

Learn more about Internet from

https://brainly.com/question/2780939

#SPJ1

your University wants to create a new department for university alumni. Every
employee has their own system credentials and they can use these credentials on any system inside the
building. how can you ensure the system authorization, availability and monitoring.

Answers

The way to ensure the system authorization, availability and monitoring is that an efficient and effective online examination system be made or a system where all can clock in daily can be used.

What is system credentials?

The system credentials is seen as a kind of Credentials that is known to be used for the verification of peoples identity as well as been used as a tools for authentication.

Note that they can be part of a certificate or other authentication act that helps to know the identity of a user's and as such, The way to ensure the system authorization, availability and monitoring is that an efficient and effective online examination system be made or a system where all can clock in daily can be used.

Learn more about system credentials from

https://brainly.com/question/4670419

#SPJ1

The miniaturization of which of the following inventions allowed integrated circuits to get smaller, leading to the creation of the microprocessor?.

Answers

The miniaturization of microchip inventions allowed integrated circuits to get smaller and leads to the creation of the microprocessor.

What is Microprocessor?

A Microprocessor may be defined as a kind of miniature electronic device that significantly stores the arithmetic, logic, and control circuitry mandatory to carry out the functions of a digital computer's central processing unit.

Microchips are silicon devices that remarkably function as the central processing unit in the computer. These chips possess numerous electronic components which are utilized to carry out specific mathematical operations.

Along with this, these chips also migrate data from one memory location to another with the support of microprocessors.

Therefore, the miniaturization of microchip inventions allowed integrated circuits to get smaller and leads to the creation of the microprocessor.

To learn more about Microprocessors, refer to the link:

https://brainly.com/question/13164100

#SPJ1

Your question seems incomplete. The most probable complete question is as follows:

The miniaturization of which of the following inventions allowed integrated circuits to get smaller, leading to the creation of the microprocessor?

microchipelectronic circuitvacuum tubetransistor

HELP PLEASE
Which type of error occurred in the following lines of code?

>>> print(9 / 0)
Traceback (most recent call last):
File " ", line 1, in
9/0
ZeroDivisionError: division by zero

logical error
logical error

exception
exception

syntax error
syntax error

reserved word error
reserved word error

Answers

Answer:

Logical Error

Explanation:

The division by 0 is a logical error.

How many input configurations does the Boolean expression (x AND Y) OR (NOT x
AND NOT y) have?
4
6
8
10
CAN SOMEONE PLSEASEEE HELP ME

Answers

Answer:

4

Explanation:

There are only 2 inputs, X and Y, and the number of different input configurations will be 2-to-the-power-of the number of inputs.

2² = 4

In other words, XY can be 00,01,10 or 11 and that's it. Four combinations.

BTW, (x AND Y) OR (NOT x AND NOT y) is allso called XNOR. See picture.

Which of the following makes the varied types of digital communication possible?


an agreed-upon set of rules and standards governing the way technology shares and manages data


properly linking all of the workstations on a closed loop-like configuration


refraining from relying too heavily on one central hub that connects all nodes on a system


only using a high-quality server computer with lots of memory

Answers

Answer:

An agreed-upon set of rules and standards governing the way technology shares and manages data

Which of the following commands will visualise the running processes?

Select one:
a. Get-Process
b. Get-RunningProcesses
c. Show-Process

Answers

Answer:

A

Explanation:

The PS command displays your currently running processes in real-time. This will display the process for the current shell with four columns: PID returns the unique process ID.

A

It shows your current running instant in real-time

Which menu option allows you to change the display to close-up, single, or multiple pages?

Answers

What is the question asking for?……

write a complete main that will input a decimal number, double it and display the results

Answers

Answer:

No sure what language you want but since I am best with Java.

class Main {

 public static void main(String[] args) {

   Scanner input = new Scanner(System.in);  // Create a Scanner object

   System.out.println("Enter Number");

double number01 = input.nextLine();  // Read user input

double multi = number01 * 2;

   System.out.println("Number is " + multi);  // Output user input

}

}

Explanation:

Advantages and Disadvantages of Modern Devices​

Answers

Answer:

Advantages of Technology:

Easy access to information

Improved Communication

The convenience of travelling

Convenience in Education

Improved entertainment

Disadvantages of technology

Excessive dependency

Inevitable Cheating

Laziness and forgetting the basic way of studying

Assume that your company provides IT systems integration consultancy for mid-size
manufacturing, distribution and logistics companies in the country. Having recommended and
implemented a Management Information Systems (MIS) for one on your leading clients, and
taken part in the training session of the MIS conducted by the vendor, develop a process model
with the appropriate tool set for the activities that must be performed by the sales ordering
module of the MIS to capture customer’s sales order for a named client. (Note: Your solution
must include (but not limited to) an explanation of the sales module of the MIS and the steps
involved in the sales order activities).
Discuss how information systems are useful for organizations?

Answers

Every company needs records of its actions in order to identify the root of issues and implement appropriate fixes. Storage of operational data, communication logs, documents, and modification histories can be done with the help of information systems.

Why is information system important?

By supplying organizations with information they can use to make informed decisions, information systems may help them make better judgments. An organization might, for instance, employ an information system to gather sales data, which will show which products are selling well and which are not. The things to promote or delete can then be decided using this data.

By processing data from company inputs to produce information that is valuable for managing your operations, information systems become important. You can either add more data to make the information more accurate or use the information in innovative ways to boost the usefulness of the information system.

By enabling managers and other organization leaders to store data in folders and documents that can be seamlessly shared with the right personnel, information systems help disseminate information.

Learn more about information systems on:

https://brainly.com/question/14688347

#SPJ1

to group worksheets together press and hold the _____ key​

Answers

Answer : to group worksheets together press and hold Ctrl key.

Which of the following information
is required by application programs
to access the content ofa file.
a. File name
b. File location
c. File extension
d. File size

Answers

An information which is required by application programs to access the content of a file is: c. File extension.

What is a file?

A file can be defined as a computer resource or type of document that avails an end user the ability to save or record data as a single unit on a computer storage device.

In Computer technology, a sequence which best reflects the size of various files and their extension on a computer system, from smallest to largest include the following:

Text (.txt)Compressed files (.zip)Picture (.jpeg)Audio (.mp3)Video (.mp4)

In conclusion, we can reasonably infer and logically deduce that an information which is required by application programs to access the content of a file is file extension because an error would occur if there's an incompatibility issue between the two resource.

Read more on file extensions here: brainly.com/question/1982059

#SPJ1

I want to know if C# can be used to solve questions here as well.

Answers

What exactly is the question that you’re asking what is C #?

How is the Agile way of working different?

Answers

Answer:

It is working within guidelines (of the task) but without boundaries (of how you achieve it).

The Internet is the largest example of a _____?

Answers

Answer:

the answer is wide area network

Raw images can be processed again at a later date when new and improved software become available.
Group of answer choices

True

False

Answers

Answer:

True

Explanation:

Your team has been assigned responsibility to identify an appropriate MSSP provider for a small, rural hospital. What criteria will you use to select an appropriate provider? Do research online to identify three MSSP providers. Use the criteria you established to rate each of the three, and choose the one that would be best for the hospital.

Answers

The Criteria for Choosing the Right MSSP for for a small, rural hospital are:

Customized solution. UX – User experience. Responsiveness. Cost-effective.

What are the three MSSP providers?

They are:

1) Cipher.

2) SecurityHQ.

3) SecureWorks.

The option that is chosen among the three is Cipher. It is known to be chosen because they provide the services listed above which is needed by the hospital as well as:

Cybersecurity MonitoringIncident Management and Cyber Defense Security Asset Management, etc.

Therefore, based on the above. The Criteria for Choosing the Right MSSP for for a small, rural hospital are:

Customized solution. UX – User experience. Responsiveness. Cost-effective.

Learn more about Cipher from

https://brainly.com/question/14754515
#SPJ1

Answer the following questions in your own words.
[tex] \\ \\ [/tex]
1. What is the difference between tools and equipment?

2. Describe the word paraphernalia.​​

Answers

1. A tool is something more specific, used to do work. Tools are always equipment, but a pice of equipment is not always a tool. For instance a hammer and a saw are tools, and if you’re planning to build something they are part of your equipment for the job

2. The separate real or personal property of a married woman that she can dispose of by will and sometimes according to common law during her life

How does the CPU interface with the device to coordinate the transfer?

Answers

Explanation:

The CPU can initiate a DMA (Direct Memory Access) operation by writing values into special registers that can be independently accessed by the device, The device initiates the corresponding operation once it receives a command from the CPU.

A computer science degree does not typically give students the necessary skills to easily learn a new computer language. True or False.

Answers

Answer:

False

Explanation:

what is paragraph indentation

Answers

Answer:

a blank space between a margin and the beginning of a line of text

Explanation:

The space before start start of your paragraph. Ex:what I did with the first sentence

What device that will have the most network ports.

Answers

Answer:

switch device

Explanation:

because its purpose is to connect many devices.

Answer: SWITCH DEVICE

Explanation:

You do not need to cite anything used from creative commons.
True or False?

Answers

True. It is not necessary to cite information that is common knowledge. One of the ways to judge if something is common knowledge is to ask yourself if anyone in the field would know this information or if no one would argue against it.

Answer: False

Explanation: Creative commons is when a person uploads their own copyrighted content and gets license for it, so it other people online may add to it or alter it and re-share it. They get to decide how you get to use and what you are allowed to do with but no matter the situation you always have to give credit to the original content creator. Thus, false, you NEED to cite anything used from Creative Commons.

Write code to print values of integers x, y, and z in a single line such that each value is left-justified in 6 columns

Answers

The code to print given value can be x = int(input ("enter first number: ")) y = int(input ("enter second number: ")) z = int(input ("enter third number: ")) print('%6d %6d %6d' %(x,y,z)).

What is a code?

Print is a function in many programming languages that sends text, variables, or another object to the screen. If you're more familiar with the Scratch programming language, print is equivalent to say.

The print command is used to print a file without using a printing-capable Windows application.

We receive three integer variables (x,y,z) using the Python programming language, and the values are printed out using string formatting (%6), which specifies that the output should be right justified with a width of 6.

x = int(input ("enter first number: "))

y = int(input ("enter second number: "))

z = int(input ("enter third number: "))

print('%6d%6d%6d'%(x,y,z)).

Thus, this is the code to print given value.

For more details regarding a code, visit:

https://brainly.com/question/1603398

#SPJ1

Other Questions
In an arithmetic sequence, the 10th term (a10) is 30 and the common difference is 2. What is the 1st term (a)? Question 13 of 24Which word best describes the tone of a speech rather than its style?OA. WordyOB. DistrustfulOC. DetailedOD. PredictableSUBMIT Rewrite each word group below, making the first word possessive. Which themes are found within Jack London's "To Build a Fire"? Select three options.Belief in oneself is all that is needed to achieve a goal.Nature is a powerful force and should be given great respect.Humans can learn a great deal from animals around them.Wisdom is gained by listening to those who have gone ahead.Love is the greatest emotion and can conquer all challenges. characteristics of close corporation the principles that guided the pharaoh in his governance of egypt were personified by which egyptian goddess? you are bearish on telecom and decide to sell short 100 shares at the current market price of $35 per share. on august 1, paid $72,000 cash to purchase houtte's 9%, six-month debt securities ($72,000 principal), dated august 1. Jessiah can run 624 feet in 36 seconds. malik can run 720 feet in 54 seconds. who can run faster? show or explain how you know. l. lyons started a business and invested $4,000 in exchange for common stock. illustrate how to record the transaction in the t-accounts by completing the following sentence. the cash account would be (debited/credited) on the (left/right) side of the t-account and the common stock account would be (debited/credited) on the (left/right) side of the t-account. I need someone go at history answer What kind of analysis can you provide for how the Silk Road would have affected the lives of people in different areas? due to advances in high speed communication networks, the information lag, or the time it takes for information to be disseminated around the world, has been significantly shortened. What is the solution to r/-3 = 12? A. r=-36 B. r= -4 C. r=4 D. r=36 (1 point) coyne sm, holmgren h, keenan-kroff s, peterson s, stockdale la. 2020. prenatal predictors of media use during infancy. cyberpsychology, behavior, and social networking. 23:377-383. a criminologist who views crime as a function of personality, development, social learning, or cognition takes what approach to crime causation? human neural stem cell transplants to address multiple pathologies associated with traumatic brain injury. The drama club is selling tickets to their play to raise money for the show's expenses. Each student ticket sells for $6 and each adult ticket sells for $9. There was a total of $747 in revenue from the sale of 98 total tickets. Write a system of equations that could be used to determine the number of student tickets sold and the number of adult tickets sold. Define the variables that you use to write the system. Why did British Parliament transfer power from the British East India Company to QuiVictoria? "It is claimed by some people that severe illness is caused by depression and anger. After all,people who are severely ill are very often depressed and angry. Thus, it follows that the causeof severe illness actually is the depression and anger. Therefore, a good and cheerful attitude isthe key to staying healthy."What logical fallacies? PLEASE PLEASE PLEASE ANSWER !!! What is the equation of the given line?x = 0 y = -2x = -2 y = -1