Sha256: 4134d84a2e0a24be5ac5429e306e6732cda9368e83ff3cafa2fb9ea13dea79bf

Contents?: true

Size: 381 Bytes

Versions: 11

Compression:

Stored size: 381 Bytes

Contents

#!/usr/bin/env python
# Content above the snippet is ignored

print 'Hello, world!'

# {{snippet factorial}}
def factorial(n):
    if n == 0:
        return 1
    else:
        return n * factorial(n-1)
# {{endsnippet}}

# So is content below the snippet
print "{{snippet factorial_result}}"
print "The result of factorial(7) is:"
print "  %d" % factorial(7)
print "{{endsnippet}}"

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
omnitest-0.2.2 spec/fixtures/factorial.py
omnitest-skeptic-0.0.3 spec/fixtures/factorial.py
omnitest-0.2.1 spec/fixtures/factorial.py
omnitest-skeptic-0.0.2 spec/fixtures/factorial.py
polytrix-0.1.4 spec/fixtures/factorial.py
polytrix-0.1.3 spec/fixtures/factorial.py
polytrix-0.1.2 spec/fixtures/factorial.py
polytrix-0.1.1 spec/fixtures/factorial.py
polytrix-0.1.0 spec/fixtures/factorial.py
polytrix-0.1.0.pre spec/fixtures/factorial.py
polytrix-0.0.1 spec/fixtures/factorial.py