Permalink
Cannot retrieve contributors at this time
docassemble/docassemble_base/docassemble/base/data/questions/examples/code-example-07.yml
Go to filemetadata: | |
title: If/then/else | |
short title: If | |
documentation: "https://docassemble.org/docs/code.html#if" | |
example start: 1 | |
example end: 2 | |
--- | |
code: | | |
a = 4 | |
b = 5 | |
if b > a: | |
b = 62 | |
answer = 20 + b | |
else: | |
answer = 40 + b | |
b = 0 | |
--- | |
question: | | |
The answer is ${ answer }. | |
mandatory: True |