Browse Source

feat(hello_python): add new exercise subject for scripting piscine

pull/1760/head
Michele Sessa 1 year ago committed by Michele
parent
commit
1984891870
  1. 8
      sh/tests/hello_python_test.py
  2. 2
      sh/tests/solutions/hello_python.py
  3. 4
      subjects/devops/hello_python/README.md

8
sh/tests/hello_python_test.py

@ -1,8 +0,0 @@
import sys
sys.path.append('/jail/app/student')
from hello_python import say_hello_python
def test_say_hello_python():
assert say_hello_python() == "Hello Python!"

2
sh/tests/solutions/hello_python.py

@ -1,2 +0,0 @@
def say_hello_python():
return "Hello Python!"

4
subjects/devops/hello_python/README.md

@ -50,10 +50,10 @@ $
- Python uses indentation to indicate in which block your code will run (many other languages uses parenthesis instead). It is then very important to indent your code properly.
- `return` is a special world used to say which value a function should return (a function could also not return anything).
For example `return 10` will return the number ten.
For example `return 10` will return the number ten.
- A string is a set of characters wrapped by `"`.
For example `"Ciao bella"` is a string containing the worlds `Ciao Bella`.
For example `"Ciao bella"` is a string containing the worlds `Ciao Bella`.
- In `test.py` we are calling another function named `print`. This function is already present in Python standard library so we don't have to create it. This function at its core is made to write strings in the standard output.

Loading…
Cancel
Save