Problem | Sololearn: Learn to code for FREE!

0

Problem

Why the projects after completing the lessons are too hard ? I can't even understand them and when I am trying to check the solution, then there are some functions used in that solution that is not taught in any lesson.. WTf Sololearn

6/26/2022 8:09:03 AM

Sachin

22 Answers

New Answer

+11

No need to swear bro! Your curiosity is your power. If you see something "new" or not available in the courses, then simply look it up on the web. The knowledge you gain from searching about that "new" thing is a bonus you get apart from solving the problem 👍

+6

To be Frank with you Sololearn doesn't have to teach you everything You need to go and learn more outside of sololearn For example in your school Does the teacher teaches you everything from A-Z? No You go and learn the remaining on your own Sololearn is just trying to give you a headstart and a basic understanding of the languages not to teach you in details

+4

Sachin They are trying to prepare you for that To prove you have researched and learned about the details of the course You just need to keep researching because nobody will tell you everything in details The code coaches are all similar to the lessons you undertake It's just that the logic seems very complicated but it relates to those lessons✌👍

+3

This was my solution Not sure if you understand the problem so here is my explanation We are trying to find the sum of the points the player received for each level. The first line gives us the levels passed, the lines after give us the points The code given reads the first line and stores the value in the variable called 'levels', in the example that variable is 3 it then loops through the rest of the input values and stores them in the array variable called 'points', so points is [1, 4, 8] in my solution I simply looped through the points array, and added each value to the 'sum' variable var sum = 0; //calculate the sum of points for (i = 0; i < points.length; i++) { sum += points[i]; } using a for loop i looped through the 'points' array, using points.length we ensure the loop only runs for the amount of items in our array, in this case that is 3. then using sum, i added each number to sum to get the final result so sum += points[i] goes like this: for Loop 1: sum = 0, and i = 0, so points at position 0 (points[0]) equals 1 so it goes 0 + 1 = 1 sum now equals 1 for Loop 2: sum = 1, and i = 1, so points at position 1 (points[1]) equals 4 so it goes 1 + 4 = 5 sum now equals 5 for Loop 3: sum = 5, and i = 2, so points at position 2 (points[2]) equals 8 so it goes 5 + 8 = 13 sum now equals 13 now because we used points.length the loop stops here so when we console.log(sum) we get 13, which as it shows, is our expected outcome. Hope this helps, let me know if you have any more questions

+3

Then everything there in the question you should have seen before. I never checked the solutions before completing the quiz but there are multiple ways to solve each quiz. I agree its strange to see new things that were not taught. But when ever I see something new. I just google it. And continue working. I don't expect the app to explain everything with their bit size teaching. Always keep multiple resources handy.

+2

Although everything in the code project has meaning I usually ignore everything above //your code goes here. And focus on the task.

+2

Also use the Q&A search. Millions of people have taken these lessons and have had similar doubts. You can find many explanation and different solutions if you use the search feature

+1

What lesson?

+1

I somewhat agree with what you are saying, however I don't agree with you saying the problems are too hard. I do agree that they shouldn't use functions that haven't been taught in the solution, however the solutions given are just one of many ways to solve these problems. Programming in a nutshell is about problem solving, there is a problem and you need to solve it, it will never be not be hard. Like with all problems there is no one way to do things, there are many ways to solve a single problem and you need to find a way that works with you. The projects are there to challenge you and yes the solutions might not be ideal, but they are there as a last resort (in my opinion they shouldn't be there at all), you should do your best to research and use your resources to find a solution that you understand, whether that be google or using forums to ask questions. If you really don't understand the problem you should maybe go over the previous lessons or do some extra research on the topic that the problem is based on. As it is all the problems are solvable based on the lessons, it is just a matter of understanding and knowledge that will allow you to solve them, that will come with time, practice and experience. Don't let the challenge dishearten you, use it as a way to learn and overcome similar problems in the future.

+1

What part of that code is new to you?

+1

That is strange is that your first practice quiz?

+1

The response found here explains the elements found in the Practice. https://www.sololearn.com/Discuss/2898009/?ref=app

+1

How do compain a name like additional variable in python ?

+1

Indeed projects can be difficult for someone who just went through the lesson, but remember that you can save your project code upon leaving the project. You can always go back to the lesson itself and look at it from the point of the project - “what should I do if I want to apply…”. And check comments. Masters wait there for you with their knowledge.

0

Jay Matthews What ?😑 The solutions are using some functions that is nowhere in any lessons .. So how will I complete the projects.. Fir example In javascript, there is a code project named "level up" But the solution is using reduce() function and there is no lesson for reduce() function .... Wtf 😑😑😑😑

0

Zac Tucak 😑

0

Zac Tucak The player receives points after passing each level of a game. The program given takes the number of passed levels as input, followed by the points gained for each level, and creates the corresponding array of points. Complete the program to calculate and output to the console the sum of all gained points. Sample Input 3 1 4 8 Sample Output 13 Explanation The first input represents the number of passed levels, -- in this case, 3 (the size of an array to be created). The next 3 inputs are the points awarded to the player for passing each level. The player gained 1+4+8 points for 3 passed level function main() { //take the number of passed levels var levels = parseInt(readLine(),10); var points = new Array(); var count = 0; while(count<levels){ var elem = parseInt(readLine(),10); points[count] = elem; count++; } var sum = 0; //calculate the sum of points //output console.log(sum); }

0

Chris Coder The player receives points after passing each level of a game. The program given takes the number of passed levels as input, followed by the points gained for each level, and creates the corresponding array of points. Complete the program to calculate and output to the console the sum of all gained points. Sample Input 3 1 4 8 Sample Output 13 Explanation The first input represents the number of passed levels, -- in this case, 3 (the size of an array to be created). The next 3 inputs are the points awarded to the player for passing each level. The player gained 1+4+8 points for 3 passed level function main() { //take the number of passed levels var levels = parseInt(readLine(),10); var points = new Array(); var count = 0; while(count<levels){ var elem = parseInt(readLine(),10); points[count] = elem; count++; } var sum = 0; //calculate the sum of points //output console.

0

Chris Coder Everything

0

Chris Coder no this is 40th