This website works better with JavaScript.
Home
Explore
Help
Sign In
E2L_Ivry
/
cours-python
Watch
5
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
More functions for 03.py
master
Dimitri Merejkowsky
6 years ago
parent
cad8540175
commit
beecdbbb34
2 changed files
with
17 additions
and
8 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+0
-8
sources/03-add.py
+17
-0
sources/03-fonctions.py
+ 0
- 8
sources/03-add.py
View File
@@ -1,8 +0,0 @@
# ceci est un commentaire
def add(a, b):
return a + b
a = 1
b = 2
c = add(a, b)
print(c)
+ 17
- 0
sources/03-fonctions.py
View File
@@ -0,0 +1,17 @@
def add(a, b):
return a + b
a = 1
b = 2
c = add(a, b)
print(c)
def greet(name, shout=False):
print("Hello,", end=" ")
print(name, end="")
if shout:
print("!", end="")
print("", end="\n")
greet("John")
greet("Jane", shout=True)