try
Code:
program:
words=raw_field('#words');
shelf_name=cmp(words, 1000, 'Short Story', 'Novel', 'Novel');
shelf_name=cmp(words, 5000, shelf_name, 'Medium', 'Medium');
shelf_name=cmp(words, 20000, shelf_name, 'Long', 'Long');
shelf_name=cmp(words, 50000, shelf_name, 'Epic', 'Epic');
The idea is
If the words are <
1000 then use
Short Story else
Novel
If the words are <
5000 then use the already set name (either
Short Story or
Novel) else use
Medium
If the words are <
20000 then use the already set name (either
Short Story,
Novel or
Medium) else use
Long
If the words are <
50000 then use the already set name (either
Short Story,
Novel,
Medium or
Long) else use
Epic