Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Ganesh-Chandran005 authored Dec 19, 2024
1 parent e1199db commit 32fb9cc
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions Day-20/Gaaanesh.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
def greet(name):

def message():
return "How u doin :)!"

return f"Sup, {name}. {message()}"
name=input("Enter you name:")
print(greet(name))


def calculator(a, b):
def add():
return a + b

def subtract():
return a - b

def multiply():
return a * b

def divide():
return a / b if b != 0 else "Division by zero!"

return {
"add": add(),
"subtract": subtract(),
"multiply": multiply(),
"divide": divide()
}

a=int(input("Enter a number:"))
b=int(input("Enter a number:"))
results = calculator(a,b)
print("Addition:", results["add"])
print("Subtraction:", results["subtract"])
print("Multiplication:", results["multiply"])
print("Division:", results["divide"])

0 comments on commit 32fb9cc

Please sign in to comment.