Skip to content

Instantly share code, notes, and snippets.

@sly01
Created July 24, 2018 08:21
Show Gist options
  • Save sly01/fabf27ac53aed93d2cc81f0cbaee7aaa to your computer and use it in GitHub Desktop.
Save sly01/fabf27ac53aed93d2cc81f0cbaee7aaa to your computer and use it in GitHub Desktop.

Revisions

  1. sly01 created this gist Jul 24, 2018.
    16 changes: 16 additions & 0 deletions Task1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    #!/usr/bin/env python3.6

    message = input("Enter a message: ")
    count = input("Number of repeats [1]: ").strip()

    if count:
    count = int(count)
    else:
    count = 1

    def multi_echo(message, count):
    while count > 0:
    print(message)
    count -= 1

    multi_echo(message, count)