Question: How many programming languages do we know that differ from Python (subreddit learnpython) or whose operating system is Microsoft Windows ?
Choices:
1
2
3
4
5
6
7
8
9
10
Answer: 4
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "programming language" .  { ?e_1 <different_from> ?e . ?e_1 <pred:name> "Python" . ?e_1 <subreddit> ?pv . ?pv <pred:value> "learnpython" .  } UNION { ?e <operating_system> ?e_1 . ?e_1 <pred:name> "Microsoft Windows" .  } }
Program:
function: Find
inputs: Python
function: FilterStr
dependencies: 0
inputs: subreddit
learnpython
function: Relate
dependencies: 1
inputs: different from
forward
function: FilterConcept
dependencies: 2
inputs: programming language
function: Find
inputs: Microsoft Windows
function: Relate
dependencies: 4
inputs: operating system
backward
function: FilterConcept
dependencies: 5
inputs: programming language
function: Or
dependencies: 3
6
function: Count
dependencies: 7