C
Describe the scope of the variables in this code.
class cholesterol:
low Density = 0
highDensity = 0
class patient:
definit__(self, firstName.lastName,id Num):
self.firstName = f[rstName
self.lastName = lastName
self.id Num = idNum
def str (self):
return self.firstName +""+self.lastName + " + self.id Num
The scope of high Density is limited to the patient class
The scope of firstName is limited to the cholesterol class

C Describe the scope of the variables in this code class cholesterol low Density 0 highDensity 0 class patient definitself firstNamelastNameid Num selffirstName class=

Respuesta :

Answer:

The scope of highDensity  is accessible by the entire program .

The scope of firstName  is limited to the patient class .

Explanation:

Correct answer edge 2020

The scope of highDensity is limited to the cholesterol class and the scope of the firstName is limited to the patient class.

Variable scope

The accessibility of a program is described by the scope of a variable.

To put it another way, it's the part of the program where the variable is identified.

The place you declared a variable determines the scope. There are two major scopes of variables in python.

  • Global variables
  • Local variables

Therefore, the scope of highDensity is limited to the cholesterol class and the scope of the firstName is limited to the patient class.

learn more on variable scope here: https://brainly.com/question/21065208

#SPJ2

RELAXING NOICE
Relax