You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

03-fonctions.py 288 B

12345678910111213141516171819
  1. def add(a, b):
  2. return a + b
  3. nombre_1 = 1
  4. nombre_2 = 2
  5. c = add(nombre_1, nombre_2)
  6. print(c)
  7. def greet(name, shout=False):
  8. print("Hello,", end=" ")
  9. print(name, end="")
  10. if shout:
  11. print("!", end="")
  12. print("", end="\n")
  13. greet("John")
  14. greet("Jane", shout=True)