mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 10:03:31 +00:00
777 B
777 B
Python basics
Python is a nice language, you can add stuff. Bla bla bla.
Lets jump into an exercise :
It's dead simple, c must be the sum of a and b
a = 1
b = 2
a = 1
b = 2
c = a + b
assert(c, 3)
Some more nice content ....
And look at this pretty picture:

Lets go for another exercise but this time with some context :
Exercise with some context code :
Using the double function provided, build a quadruple function
def quadruple(x):
return double(double(x))
assert(quadruple(8), 32)
def double(x):
return x * 2