'''
Created on May 23, 2021
@author: Admin
'''
# print("inbuilt function ")
# print("hello ")
# a=int(input("enter 1st number:"))
# b=int(input("enter 2nd number:"))
# c=sum((a, b))
# print(f"Sum is printed:{c} \n")
#User define Function
def Func1():
print("This is a function 1")
# Func1()
# Argument function
# def fun2(a,b):
# print("Sum is :",end=" ",a+b)
# # fun2(44,66)
#
# # Return type function
#
# def fun3(a,b):
# print("Returned :",end=" ")
# # return a+b
# # c=fun3(8, 5)
# # print(c)
def my_function(name,email_id):
print(name,email_id)
my_function("John","John@helix.co.in")
my_function("Roshan","Roshan@helix.co.in")
my_function("Prince","prince@helix.co.in")
# Arbitrary Arguments, *args
# def my_function(*kids):
# print("The youngest child is " + kids[2])
#
# my_function("Emil", "Tobias", "Linus")
# Keyword Arguments
# def my_function(child3, child2, child1):
# print("The youngest child is " + child3)
#
# my_function(child1 = "Emil", child2 = "Tobias", child3 = "Linus")
# Default
# def my_function(country = "Norway"):
# print("I am from " + country)
#
# my_function("Sweden")
# my_function("India")
# my_function()
# my_function("Brazil")
# loop
# def my_function(food):
# for x in food:
# print(x)
#
# fruits = ["apple", "banana", "cherry"]
#
# my_function(fruits)
Comments
Post a Comment