Write syntax for function that takes a string as input parameter and prints it on standard screen.
Answers
Answered by
0
def printme (str): “This prints a passed string into this function”
Answered by
0
The syntax is as follows :
def string (str_):
“Hello Everyone”
print (str_ )
return
- In this function, def keyword is used to define a function.
- The function name is "string" having a parameter named "str_"
- In this function, a string is passed.
- After that, the string is printed using the print function.
- And then the function is returned.
Similar questions