From 009b2fa8437a20ce7563ccecd307465cf7567a4e Mon Sep 17 00:00:00 2001 From: Dimitri Merejkowsky Date: Sat, 1 Dec 2018 19:05:10 +0100 Subject: [PATCH] no if name is main --- sources/03-fonctions.py | 2 ++ sources/04-pendu.py | 4 +--- sources/05-airports.py | 3 +-- sources/06-top-words.py | 3 +-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/sources/03-fonctions.py b/sources/03-fonctions.py index 8d6851e..521baab 100644 --- a/sources/03-fonctions.py +++ b/sources/03-fonctions.py @@ -6,6 +6,8 @@ b = 2 c = add(a, b) print(c) + + def greet(name, shout=False): print("Hello,", end=" ") print(name, end="") diff --git a/sources/04-pendu.py b/sources/04-pendu.py index 1a63413..28d37f3 100644 --- a/sources/04-pendu.py +++ b/sources/04-pendu.py @@ -47,6 +47,4 @@ def main(): print("Gagné") return - -if __name__ == "__main__": - main() +main() diff --git a/sources/05-airports.py b/sources/05-airports.py index ab19b81..d6bf844 100644 --- a/sources/05-airports.py +++ b/sources/05-airports.py @@ -27,5 +27,4 @@ def main(): print(result) -if __name__ == "__main__": - main() +main() diff --git a/sources/06-top-words.py b/sources/06-top-words.py index 8817ba4..407fa3a 100644 --- a/sources/06-top-words.py +++ b/sources/06-top-words.py @@ -33,5 +33,4 @@ def main(): stream.close() -if __name__ == "__main__": - main() +main()