The Joy of Computing with Python Unproctored exam (8-9PM) Review |Question paper and answer given
Basically the evening session is lighter tough for me. I solved in half an hour. If you did not see the morning session review. First read that and come back for to read this article.
*Also Read -> Joc morning session review (question and answer included)
*Also Read -> Joc Proctored exam (Dec 19, 2020) Review
Now we are going to see the question and answer(my solution) for evening session. This blog will help for upcoming batches, to know how was the unproctored exam. This is open resource exam and 1 hour duration.
Note:
In future batches they may ask more questions or less questions but any number of questions they ask that can be solved within 1hour. Because they fix the questions in that way. For this session (Dec 2020) morning 8-9PM Unproctored exam, they asked only one question to solve.
Note:
This is for only educational purpose. The question and answer for the exam in this blog is posted only after the exam is completed i.e. after 9 pm for morning session.
Question paper and answer for unproctored exam 8-9PM
Programming exam 2: Word count
Note:
All the words are composed of lowercase English letters only.
Input Format
It should contain all the words separated by space.
Output Format
Output the number of distinct words from the inputOutput the number of occurrences for each distinct word according to their appearance in the input.
Both the outputs should be separated by space.
Sample Input
bcdef abcdefg bcde bcdef
Sample Output
3 211Explanation
There are distinct words. Here, "bcdef" appears twice in the input at the first and last positions. The other words appear once each. The order of the first appearances are "bcdef", "abcdefg" and "bcde" which corresponds to the output.
Post a Comment