-
-
Save uncoded-ro/08a1357a970620b0f0ea534b8a3c79f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Rolul acestui modul este acela de a introduce functii pentru transmiterea de mesaje. | |
Fisier: hello.py | |
Autor: airman | |
Versiune Python: 3.7""" | |
default_name = 'Ghita' | |
def hello_python(): | |
"""Returneaza un mesaj de tipul Hello Python!""" | |
return 'Hello Python!' | |
def hello_name(name = default_name): | |
"""Returneaza un mesaj personalizat sau Hello Ghita! daca nu se transmite un nume.""" | |
if len(name) <= 2: | |
raise ValueError("Invalid name!") | |
return 'Hello {}!'.format(name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment