Q. Name some of the commonly used functions.
those who will give useless answer i will report his/her answer
Answers
Answered by
1
Answer:
Multiple functions ,
Explanation:
inserting a
Answered by
1
Answer:
Example of a function
#
# this is a simple function that remembers who like hamburgers and who doesn't like hamburgers.
#
def likesHamburgers(name):
if name == "Alisher":
likes_hamburgers ="yes"
else:
likes_hamburgers="no"
return likes_hamburgers
print likesHamburgers("Bill")
print likesHamburgers("Alisher")
print likesHamburgers("foo")
Another classic example of a function
#
# this is a simple function
#
def calculator(number1, number2):
answer = number1 + number2
return answer
print calculator(12,43)
print calculator(91,673)
print calculator(1,3)
print calculator(87,1098)
Explanation:
Hope it helps you dear
Similar questions