mirror of
https://github.com/opsschool/curriculum.git
synced 2025-12-06 12:19:49 +01:00
Merge pull request #250 from giovtorres/fix_pdf
Fixed block quotes so that PDFs can build successfully.
This commit is contained in:
commit
1b6ee7ab2f
|
|
@ -563,30 +563,30 @@ Instead, function blocks are separated using indentation.
|
|||
|
||||
.. code-block:: python
|
||||
|
||||
>>> def square(x):
|
||||
... result = x*x
|
||||
... return result
|
||||
...
|
||||
>>> square(3)
|
||||
9
|
||||
>>> def square(x):
|
||||
... result = x*x
|
||||
... return result
|
||||
...
|
||||
>>> square(3)
|
||||
9
|
||||
|
||||
|
||||
You can even call functions within other functions
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
>>> def greet(name):
|
||||
... greeting = "Hello "+name+"!"
|
||||
... return greeting
|
||||
...
|
||||
>>> def new_user(first_name):
|
||||
... user = first_name
|
||||
... print "New User: "+user
|
||||
... print greet(user)
|
||||
...
|
||||
>>> new_user('Jack')
|
||||
New User: Jack
|
||||
Hello Jack!
|
||||
>>> def greet(name):
|
||||
... greeting = "Hello "+name+"!"
|
||||
... return greeting
|
||||
...
|
||||
>>> def new_user(first_name):
|
||||
... user = first_name
|
||||
... print "New User: "+user
|
||||
... print greet(user)
|
||||
...
|
||||
>>> new_user('Jack')
|
||||
New User: Jack
|
||||
Hello Jack!
|
||||
|
||||
|
||||
Objects
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user