I am studying CS and have the subject “Introduction to OOP”. We have learned the very basics, but the main focus is on building OOP codes. I find it challenging because I struggle to understand the logic in the questions they ask me. The exams are split into 5 parts. The first parts are just simple questions (easy), the 2nd part is also easy, the 3rd part is decent, but the 4th and 5th parts count up to 50% of the results. I feel like if I master these parts, the rest becomes easy automatically.
I had my exam and didn’t pass. Now I’m retaking it and feel like I need some way to learn/understand the logic of the questions they give me. Below are examples of the types of questions they give:
Question 4 (Streaming Service):
In this task, you will create a first version of a simple streaming service. The streaming service offers subscribers a number of different series. Each series has one or more episodes. To make it easier for subscribers to find series they like, the service uses tags. A tag says something about the content of an episode. Examples of tags are “comedy”, “documentary”, and “drama”. Each episode can have multiple tags. Together, the tags on all episodes in the series describe what kind of content the series has and how much of different types of content there is.
When a new subscriber is created, the subscriber must specify their preferences. For each existing tag, the service asks if the subscriber likes series with this type of content, is neutral to the content, or dislikes the content. The service can then suggest series that suit a subscriber by calculating a match between the subscriber’s preferences and the tags on the various series.
[The question then goes on to describe specific classes and methods to implement, including Subscriber, Series, and Service classes with various functionalities]
Question 5:
Write a function called “common” that has a parameter “number_lists” which takes in a nested list – a list of lists of integers. The function should return a list of all integers that appear two or more times in the nested list. It doesn’t matter if such an integer is found in several different lists in the nested list or if it appears multiple times in the same list. The order in which the common numbers are returned is also not important.
For example, the call common([[1,5,1], [3,4], [2,3]]) should return either [1,3] or [3,1] since the numbers 1 and 3 appear in two places in the nested list (and since the order of the numbers returned is not important).
**Keep in mind that the people who check my exams dont run them on the console
I’m looking for resources or advice on how to approach these types of questions and improve my understanding of OOP logic. Any help would be greatly appreciated!
submitted by /u/TopMandemG
[link] [comments]
r/learnpython I am studying CS and have the subject “Introduction to OOP”. We have learned the very basics, but the main focus is on building OOP codes. I find it challenging because I struggle to understand the logic in the questions they ask me. The exams are split into 5 parts. The first parts are just simple questions (easy), the 2nd part is also easy, the 3rd part is decent, but the 4th and 5th parts count up to 50% of the results. I feel like if I master these parts, the rest becomes easy automatically. I had my exam and didn’t pass. Now I’m retaking it and feel like I need some way to learn/understand the logic of the questions they give me. Below are examples of the types of questions they give: Question 4 (Streaming Service): In this task, you will create a first version of a simple streaming service. The streaming service offers subscribers a number of different series. Each series has one or more episodes. To make it easier for subscribers to find series they like, the service uses tags. A tag says something about the content of an episode. Examples of tags are “comedy”, “documentary”, and “drama”. Each episode can have multiple tags. Together, the tags on all episodes in the series describe what kind of content the series has and how much of different types of content there is. When a new subscriber is created, the subscriber must specify their preferences. For each existing tag, the service asks if the subscriber likes series with this type of content, is neutral to the content, or dislikes the content. The service can then suggest series that suit a subscriber by calculating a match between the subscriber’s preferences and the tags on the various series. [The question then goes on to describe specific classes and methods to implement, including Subscriber, Series, and Service classes with various functionalities] Question 5: Write a function called “common” that has a parameter “number_lists” which takes in a nested list – a list of lists of integers. The function should return a list of all integers that appear two or more times in the nested list. It doesn’t matter if such an integer is found in several different lists in the nested list or if it appears multiple times in the same list. The order in which the common numbers are returned is also not important. For example, the call common([[1,5,1], [3,4], [2,3]]) should return either [1,3] or [3,1] since the numbers 1 and 3 appear in two places in the nested list (and since the order of the numbers returned is not important). **Keep in mind that the people who check my exams dont run them on the console I’m looking for resources or advice on how to approach these types of questions and improve my understanding of OOP logic. Any help would be greatly appreciated! submitted by /u/TopMandemG [link] [comments]
I am studying CS and have the subject “Introduction to OOP”. We have learned the very basics, but the main focus is on building OOP codes. I find it challenging because I struggle to understand the logic in the questions they ask me. The exams are split into 5 parts. The first parts are just simple questions (easy), the 2nd part is also easy, the 3rd part is decent, but the 4th and 5th parts count up to 50% of the results. I feel like if I master these parts, the rest becomes easy automatically.
I had my exam and didn’t pass. Now I’m retaking it and feel like I need some way to learn/understand the logic of the questions they give me. Below are examples of the types of questions they give:
Question 4 (Streaming Service):
In this task, you will create a first version of a simple streaming service. The streaming service offers subscribers a number of different series. Each series has one or more episodes. To make it easier for subscribers to find series they like, the service uses tags. A tag says something about the content of an episode. Examples of tags are “comedy”, “documentary”, and “drama”. Each episode can have multiple tags. Together, the tags on all episodes in the series describe what kind of content the series has and how much of different types of content there is.
When a new subscriber is created, the subscriber must specify their preferences. For each existing tag, the service asks if the subscriber likes series with this type of content, is neutral to the content, or dislikes the content. The service can then suggest series that suit a subscriber by calculating a match between the subscriber’s preferences and the tags on the various series.
[The question then goes on to describe specific classes and methods to implement, including Subscriber, Series, and Service classes with various functionalities]
Question 5:
Write a function called “common” that has a parameter “number_lists” which takes in a nested list – a list of lists of integers. The function should return a list of all integers that appear two or more times in the nested list. It doesn’t matter if such an integer is found in several different lists in the nested list or if it appears multiple times in the same list. The order in which the common numbers are returned is also not important.
For example, the call common([[1,5,1], [3,4], [2,3]]) should return either [1,3] or [3,1] since the numbers 1 and 3 appear in two places in the nested list (and since the order of the numbers returned is not important).
**Keep in mind that the people who check my exams dont run them on the console
I’m looking for resources or advice on how to approach these types of questions and improve my understanding of OOP logic. Any help would be greatly appreciated!
submitted by /u/TopMandemG
[link] [comments]