🔧 AI Nachrichten Major AI platforms go down in unprecedented simultaneous outage(03.09.2026 um 17:34 Uhr)
🔧 AI Nachrichten ChatGPT, Claude, and Grok Down? Users Report Widespread Outages(03.09.2026 um 19:14 Uhr)
🔧 AI Nachrichten OpenAI Launches GPT-6 Astra, Says We May Have Entered the AGI Era(03.09.2026 um 22:08 Uhr)
🔧 AI Nachrichten Claude Comes to CarPlay as Fifth Major AI Chatbot App(05.09.2026 um 05:31 Uhr)
🔧 AI Nachrichten OpenAI’s GPT-6 Astra Is AGI, Says NVIDIA CEO Jensen Huang(07.09.2026 um 06:31 Uhr)
🔧 AI Nachrichten Blame AI companies for Mac mini and Mac Studio shortage(31.08.2026 um 10:32 Uhr)
🔧 AI Nachrichten Major AI platforms go down in unprecedented simultaneous outage(03.09.2026 um 17:34 Uhr)
🔧 AI Nachrichten ChatGPT, Claude, and Grok Down? Users Report Widespread Outages(03.09.2026 um 19:14 Uhr)
🔧 AI Nachrichten OpenAI Launches GPT-6 Astra, Says We May Have Entered the AGI Era(03.09.2026 um 22:08 Uhr)
🔧 AI Nachrichten Claude Comes to CarPlay as Fifth Major AI Chatbot App(05.09.2026 um 05:31 Uhr)
🔧 AI Nachrichten OpenAI’s GPT-6 Astra Is AGI, Says NVIDIA CEO Jensen Huang(07.09.2026 um 06:31 Uhr)
🔧 AI Nachrichten Blame AI companies for Mac mini and Mac Studio shortage(31.08.2026 um 10:32 Uhr)

🔧 Programmierung 🕛 kürzlich 3 Min Lesezeit
0

Python Day 2 -Functions-Meaning & types, Data type

↗ Quelle (dev.to)
🗣️ Stimme:

CODE
name = input("What is your name?")
print("Welcome to Python", name)






Use text editor to type syntax and save with extension .py and then to run this syntax in desktop page right click and select Open in Terminal



Image description



To run the program enter python3 (file name).py,Then click enter and enter a name.So that program will run.




CODE
Input
name = input("What is your name?")
print("Welcome to Python", name)

Output
What is your name?Guru
Welcome to Python Guru






Functions:செயல்கூறு(Actions)

What is function?

Set of instructions for achieving a specific task with a name.

Example:

Watching_Meyyazhagan:

1. Laptop On

2. Netflix

3. Meyyazhagan

4. Play

Now in this above example for watching meyyazhagan movie the set of instructions are to be done like laptop on, open netflix, click meyyazhagan, Then click play button, But for instant we can say watching meyyazhagan which is a name includes all these set of actions.



()-Brackets represent some action is to be done. Inside brackets if anything is specified it is called as arguments or parameters,which is used to perform that function(action).Even without any arguments also a function can be performed.



ex:

eat(food)

sleep()

walk()

cook(rice, water)

swim(dress, pool)

write_exam(hallticket, pen, paper, pencil, scale, rubber, question_paper)



*Supporting Arguments: Comma Separated arguments.



input(),print()-Before brackets what action to be done will be mentioned in this input,print are functions to be performed.



Why function is required?

It is reusable code.No need to mention the full actions again and again we can use just one function.As already said example of watching meyyazhagan contains various actions to be done but we can just say watching_meyyazhagan.



Functions criteria:




  1. Function name should be meaningful.

  2. It should action names not just object name like laptop.

  3. It should not be in numbers.

  4. It should not contain space.

  5. Only "_" special character is allowed, not other special characters.



Types of functions:

predefined-Set of functions which are predefined while creating this language.Ex:input(),print().

Userdefined-set of functions which we can define whenever required.

Ex:




CODE
#Function Definition
def calculate(no1,no2):#parameter / argument
print(no1+no2)
print(no1-no2)
print(no1*no2)
print(no1/no2)

no1 = 120
no2 = 40
calculate(no1,no2) #Function Calling Statement







The above mentioned user defined function can also be done without user defined function "calculate" as following.




CODE
no1 = 100
no2 = 5
print(no1+no2)
print(no1-no2)
print(no1*no2)
print(no1/no2)






But the problem is in this every time we have to enter the action to be done. If we have defined function it will be easy to perform by python.

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
3 Quellen
GPT-6 Astra Release Today? OpenAI’s Next Major AI Model Is Almost Here
1 Quelle
Apple accuses OpenAI of destroying evidence as trade-secrets fight intensifies
1 Quelle
Major AI platforms go down in unprecedented simultaneous outage
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Python Day 2 -Functions-Meaning & types, Data type

Thematisch verwandte Begriffe: Python, FunctionsMeaning, types, Data · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...