sammm4076 sammm4076
  • 25-02-2022
  • Computers and Technology
contestada

What does it mean when a class has an argument python?.

Respuesta :

Haileymack037
Haileymack037 Haileymack037
  • 28-02-2022

Answer:

Objects of a class can optionally accept arguments. These arguments are used to set values within an object. Consider the following code: class Employee: def __init__(self, name) self.name = name The __init__method lets us assign a value for the “self.name” variable in our class. We can reference this variable in any method in our class.

Explanation:

Answer Link

Otras preguntas

Help!! Please explain how you go it too please!!
v=kfovern   what does n=
what is .net formatting?
ABCD is a rectangle with AC=20 and AB=2BC. What is the area of rectangle ABCD?
Mr. Anders wants to put a fence around his backyard. His backyard is rectangular. The lengths of the sides are 75 yards , 45 yards, 75 yards, and 45 yards. How
What Are Genre Conventions?
Please tell me what is the State Tree of Tennessee?
how many school text book that i can buy with 5 billion? (this is my civics homework)
What type of conic section is given by the equation 4x^2+9y^2=36? What are its domain and range?
How do you find the volume inside the cylinder but outside the sphere? H=12cm.