Write the definition of a method, dashedline, with one parameter, an int. if the parameter is negative or zero, the method does nothing. otherwise it prints a complete line terminated by a newline to standard output consisting of dashes (hyphens) with the parameter's value determining the number of dashes. the method returns nothing.

Relax

Respuesta :

# python 3.x
def dashedline(int n):
    if n > 0:
        print('-' * n)


If you wanted a different language, you should make sure to specify that in your question.