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
Yuki888 [10]
3 years ago
13

Can somoene explain the function of-def __init__():In python programming language​

Computers and Technology
1 answer:
JulsSmile [24]3 years ago
8 0

Answer:

def is a keyword used to define a function, placed before a function name provided by the user to create a user-defined function

__init__ is one of the reserved methods in Python. In object oriented programming, it is known as a constructor. Python will call the __init__() method automatically when you create a new object of a class, you can use the __init__() method to initialize the object’s attributes.

Example code:

class Person:

 def __init__(self, name, age):

   self.name = name

   self.age = age

p1 = Person("John", 36)

print(p1.name)

print(p1.age)

Summary

  • Use the __init__() method to initialize the instance attributes of an object.
  • The __init__() doesn’t create an object but is automatically called after the object is created.
You might be interested in
Select the correct answer.
Dvinal [7]

Answer:

A

Explanation:

because when you make a presentation so you are already use technology

4 0
3 years ago
Why operating system is pivotal in teaching and learning
trasher [3.6K]

Answer:

Without it information flow is impossible

Explanation:

The word 'pivotal' also means crucial or vital, and so we need to consider what an operating system actually does.

Remember, merely having all the hardware of a computer would not allow you to run (install and use) programs. It is by means of an operating system that teaching programs can be installed, and it is also by means of an operating system learning can take place.

For example, a student can decode (learn) instructions/lessons from his teacher via a software program; and the software program needs an operating system to open (run) the program.

6 0
3 years ago
Is a collection of limited versions of Microsoft office programs
alexgriva [62]
A Microsoft Office Suite.

 An office suite is a collection of Microsoft Office productivity software and is readily available for both Windows and Macintosh Operating System. A list of these programs includes, Microsoft Word, Excel, Access, Powerpoint, Publisher, and Outlook. Each of these programs serve a different purpose. 

3 0
3 years ago
You need a version of usb technology that will support older usb devices, of which you have many, as well as newer ones. what wo
tiny-mole [99]
The answer you're looking for might be "backwards-compatible".
7 0
3 years ago
why might a portrait be both a portrait of the subject and the photographer? how is a photographer present in a portrait?
Nataliya [291]
Because of the reflection on the window or mirror.
5 0
2 years ago
Read 2 more answers
Other questions:
  • you were discussing software privacy with a friend were surprised to learn how software privacy can impact your life everyday. w
    10·1 answer
  • Where does the VLookup function find its lookup values?
    14·1 answer
  • An ___ is any person who spends times using technology at home
    10·1 answer
  • How we know that how many domain exist in window server 2012?
    14·1 answer
  • A ________ is a self-contained program that spreads through a computer network by exploiting security holes in the computers con
    9·1 answer
  • Which of the following translates packets so that the node can understand them once they enter through a port?
    5·2 answers
  • If your pulse is higher than your Target Heart Rate during exercise, what should you do?
    5·2 answers
  • Which of the following is used to move to end of the row?​
    8·1 answer
  • Shane is working on a new project for the sales department. The company wants a way to allow the sales force to print orders at
    5·1 answer
  • Please help with question
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!