DEV Community

Lakshmi Pritha Nadesan
Lakshmi Pritha Nadesan

Posted on

Full stack python developer - Day 2

Today I learned about
1.Introduction of python
2.Functions
3.Difference between User defined and predefined functions
4.Arguments
5.Function call
6.write a calculate program to with and without Function.

***Example:*

My first Program

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

Calculate Program without function:**
no1=120
no2=40
print(no1+no2)
print(no1-no2)
print(no1*no2)
print(no1/no2)

Calculate Program with function:

def calculate(no1,no2):
print(no1+no2)
print(no1-no2)
print(no1*no2)
print(no1/no2)

no1=120
no2=40
calculate(no1,no2)

Top comments (1)

Collapse
 
piggo151 profile image
Cole Hauser

Nice!

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay