Create a new table called nonEngViews containing the most viewed non-english film or tv series.
Save the table as a variable in the q memory space called nonEngViews.
Tried Solutions -
Return a single record in output having a tv show or movie with max number of views
pykx.Table(pykx.q(' title category language viewsMillion -------------------------------------------- squidGame tv korean 142 thePlatform film portuguese 56 '))
Test case 3 is failing -
pykx.Table(pykx.q(' quizItem success description error --------------------------------------------------------------------------- exercise3 Pass "nonEngViews exists in q memory space" "" exercise3 Pass "nonEngViews should be a q table" "" exercise3 Fail "nonEngViews should have correct number of records" "" '))
Thank you for bringing this to our attention. As it stands, the test case looks for the top 10 records and we understand it does not ask this in the question which is leading us to review and update this so that the wording of the question is accurate.
I can confirm that returning 10 records is solving the issue.
pykx.Table(pykx.q(' quizItem success description error --------------------------------------------------------------------------- exercise3Pass"nonEngViews exists in q memory space" "" exercise3Pass"nonEngViews should be a q table" "" exercise3Pass"nonEngViews should have correct number of records" "" '))
However, there is another issue with the notebook -
After all the test cases have been passed when I’m trying to submit answers using
kx.q(“submitAnswers”)
It is resulting in bellow error -
---------------------------------------------------------------------------QErrorTraceback (most recent call last) CellIn [5], line 1----\> 1kx.q("submitAnswers[]")File/opt/conda/lib/python3.10/site-packages/pykx/embedded\_q.py:221, inEmbeddedQ.\_\_call\_\_(self, query, wait, sync, \*args) 219result=_keval(bytes(wrappers.CharVector(query)),\*[wrappers.K(x)forxinargs]) 220ifwaitisNoneorwait:--\> 221returnfactory(result,False) 222returnself('::', wait=True) File/opt/conda/lib/python3.10/site-packages/pykx/\_wrappers.pyx:500, inpykx.\_wrappers.\_factory()File/opt/conda/lib/python3.10/site-packages/pykx/\_wrappers.pyx:493, inpykx.\_wrappers.factory()QError: Please ensure all testspassed before submitting. Not submitted.
Here are all the passed test cases -
pykx.Table(pykx.q(' quizItem success description error ---------------------------------------------------------- exercise1Pass"viewtab exists in q memory space" "" '))
pykx.Table(pykx.q(' quizItem success description error -------------------------------------------------------------------------- exercise2Pass"englishTV exists in q memory space" "" exercise2Pass"englishTV should be a python array structure" "" exercise2Pass"englishTV should have correct number of TV shows" "" '))
pykx.Table(pykx.q(' quizItem success description error --------------------------------------------------------------------------- exercise3Pass"nonEngViews exists in q memory space" "" exercise3Pass"nonEngViews should be a q table" "" exercise3Pass"nonEngViews should have correct number of records" "" '))
pykx.Table(pykx.q(' quizItem success description error ---------------------------------------------------------------------- exercise4Pass"totals exists in q memory space" "" exercise4Pass"totals should be a q keyed table" "" exercise4Pass"totals should have correct number of records" "" exercise4Pass"totals should have correct results" "" '))
pykx.Table(pykx.q(' quizItem success description error ---------------------------------------------------------------------------- exercise5Pass"summaryViews exists in q memory space" "" exercise5Pass"summaryViews should be a q keyed table" "" exercise5Pass"summaryViews should have correct number of records" "" exercise5Pass"summaryViews should have correct columns" "" '))
pykx.Table(pykx.q(' quizItem success description error --------------------------------------------------------------------- exercise6Pass"category of tv no longer exists in viewtab" "" exercise6Pass"records previously tv now updated to series" "" '))
pykx.Table(pykx.q(' quizItem success description error ------------------------------------------------------------------------------- exercise7Pass"views less than 60million no longer exists in viewtab" "" '))
pykx.Table(pykx.q(' quizItem success description error --------------------------------------------------------------------------- exercise8Pass"sortedViews exists in q memory space" "" exercise8Pass"sortedViews should be a q table" "" exercise8Pass"sortedViews should have correct number of records" "" exercise8Pass"sortedViews should have correct columns" "" '))