summaryrefslogtreecommitdiff
path: root/prolog/problems/sets/count_3/en.py
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-04-03 18:11:08 +0200
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-04-03 18:11:08 +0200
commit732b8f42029eced5e53debbff367131c2ea366ee (patch)
tree72affc8fd74958dad4a268a117682f76bc0b9600 /prolog/problems/sets/count_3/en.py
parentdc8aea8bc8bc9fccda142312d0fa32413531d423 (diff)
Prolog: add introduction for the sets group and make it visible
Diffstat (limited to 'prolog/problems/sets/count_3/en.py')
-rw-r--r--prolog/problems/sets/count_3/en.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/prolog/problems/sets/count_3/en.py b/prolog/problems/sets/count_3/en.py
new file mode 100644
index 0000000..481fd1c
--- /dev/null
+++ b/prolog/problems/sets/count_3/en.py
@@ -0,0 +1,11 @@
+name = 'count/3'
+slug = 'find the number of occurrences of an element in list'
+
+description = '''\
+<p><code>count(X, L, N)</code>: <code>N</code> is the number of times the element <code>X</code> appears in the list <code>L</code>.</p>
+<pre>
+?- count(1, [1,2,1,3,1], N).
+ N = 3.
+</pre>'''
+
+hint = {}