Computer Science, asked by ayushraj7413, 9 months ago

Write syntax for function that takes a string as input parameter and prints it on standard screen.

Answers

Answered by Anonymous
0

def printme (str):  “This prints a passed string into this function” 

Answered by Anonymous
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