prog7_9.py

def say(word, times=2, period="!"):
    message = word * times + period
    print(message)

say("こら", 3, "#")
say("こんにちは", 1)
say("なんで", period="?")

# プログラム7-9(仮引数のデフォルト値)