Skip to content

Instantly share code, notes, and snippets.

@uncoded-ro
Created January 10, 2020 07:53
Show Gist options
  • Save uncoded-ro/08a1357a970620b0f0ea534b8a3c79f3 to your computer and use it in GitHub Desktop.
Save uncoded-ro/08a1357a970620b0f0ea534b8a3c79f3 to your computer and use it in GitHub Desktop.
"""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