how are functions defined in python ?
Answer / chaitu
# Defines a "repeat" function that takes 2 arguments.
def repeat(s, exclaim):
"""
Returns the string 's' repeated 3 times.
If exclaim is true, add exclamation marks.
"""
result = s + s + s
if exclaim:
result = result + '!!!'
return result
Is This Answer Correct ? | 0 Yes | 0 No |
Write a python program to print table of a given number?
If basic HR function like recruitment, training are outsoureced then, why do companies have their own HR department?
Write a python program to count the number of vowels in a string?
Write a simple "Hello User" python code snippet.
Write a python program to find the second largest number in a list?
Write a program to reverse a number in python?
Write a python program to check common letters in two input strings?
How do you set a global variable inside a function?
Write a python program to swap the first and last value of a list?
Write a python program to check if a number is a strong number?
Write a python program to count the number of digits in a number?
plz tell me the exam date for clerks in sbi