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]
2 years ago
13

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

Computers and Technology
1 answer:
JulsSmile [24]2 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
The objectivity of a site relates to its a. Appearance c. Graphics b. Biases d. Quotes from other Internet authors
nadya68 [22]

The answer is Biases

The objectivity of evaluating a website relates to its ability to present issues based on different points of view. It is based on whether or not the information provided is presented in a fair and balanced way. For example, is the purpose of a certain website like Coca Cola or Pepsi meant to entertain, sell something, or sway public opinion? Do you think these websites will provide information on the negative effects of drinking carbonated beverages? I do not think so! Thus, these websites have bias. Their job is to sell you their product, not to make you think deep about it. We need to ask ourselves more questions about the websites we visit. Is this website balanced or biased in a way it presents information?


5 0
2 years ago
Read 2 more answers
When did Microsoft released MS-Word 2016? S When did Microsoft released MS - Word 2016​
Pepsi [2]

Answer:

July 9, 2015

Explanation:

It was released on macOS on July 9, 2015, and on Microsoft Windows on September 22, 2015, for Office 365 subscribers. Mainstream support ended on October 13, 2020, and extended support for most editions of Office 2016 will end on October 14, 2025, the same day as Windows 10.

3 0
1 year ago
(HELP ASAP) Jenae is helping her dad create a blog for his garden club. Which tool will she use?
ser-zykov [4K]
She would make use of JavaScript if she wants to make it interactive, CSS if she wants to design it, Text editor obviously for coding the blog and a web browser for the result hope this helps
7 0
2 years ago
Read 2 more answers
Why do people enjoy codehs
Alex73 [517]

Answer: this is a moral question, but here is my view

Explanation:

we get to learn about things like java which i am currently learning for AP computer science A

6 0
3 years ago
Which of the following is a job description for a person with a degree in Information Technology? radiology engineer web develop
Jet001 [13]

Answer: Web developer

Explanation: Web developer is a job where you have to develop World Wide Web applications by programming or applications that run over the internet, and this degree would need a degree in information technology

The other degrees needed for the following jobs:

1.    Radiology engineer: Radiology is a study of diagnosing and treating diseases with the help of medical imaging. So, it needs a degree in medical combined with physics and chemistry.

2.    Toxicologist broadcast technician: is a job where the technician has to determine the factors which contributed to a person’s death. So, a person should have a degree in medicine to become a toxicologist technician

6 0
3 years ago
Other questions:
  • Fred opens a web browser and connects to the www.certskills.com website. Which of the following are typically true about what ha
    10·1 answer
  • It is difficult to use screening questions in computer-assisted surveys. <br> a. True <br> b. False
    8·1 answer
  • What is the argument in this function =AVERAGE(F3:F26)
    15·1 answer
  • What two technologies below are hybrid processors that can handle 32 bit and 64 bit operating systems natively?
    11·1 answer
  • When using social​ media, make sure to provide access to all the information needed to accurately process messages by following
    6·1 answer
  • Lil fun question : burgers or pizza??
    6·2 answers
  • Hannah decides to burn her video portfolio to a DVD. She wants to hand it over to a movie producer she will meet at a social eve
    15·1 answer
  • What are the columns in a Microsoft Access table called?
    15·1 answer
  • 5. Give one word answers:
    6·1 answer
  • in python i wrote a function where if the user inputs a certain word the function repeats over again, since the function aaks fo
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!