Act fast, special offers end soon! Up to $294 is savings when you get Premium today.
Get offer codes

Practice problems

I have completed the python fundamentals part 1 and have been working on the practice problems associated with them. The practice problems, while not mandatory, are a lot more difficult than the missions themselves. I don’t see much connection between the two. I have started going through the missions again and, after reviewing the material, still don’t see much transference of what was learned in the missions and the practice problems . Please explain.

Is there any specific practice problem that you are stuck with or are finding very difficult? I can try to compare it to the content and see what could help you best.

Hi,

I may not know the exact practice problem but here is what I did.

The missions make use of chunks of the overall problem, isolate them to do analysis but the practice problems themselves gives a more holistic view of the entire problem, which combines the different “individual” missions together.

Looking at the missions as smaller chunks of the bigger problem may give a different perspective and approach to the practice problems.

1 Like

The last 4 questions in the practice problem set dealing with x and y values are the best example. What part in mission 2 on variables and data types correlates with these practice problems. Also, can you suggest where I might find other practice problems to support my learning? Thanks for getting back to me.

For a beginner, I can understand that some of these could be challenging at first glance. You can surely provide feedback directly to DQ if you continue to feel so using the ? button in the top-right corner of those lessons.

However, as @daniel.nseyo in his comment above pointed out, looking at individual “chunks” and combining them to either break down what’s given to you or to solve a problem is a good learning approach, in general.

The content has three Mission Steps that could help you a little in solving the problems you mention -

You learn about variables and them storing a value and you learn that you can update the values in those variables. Based on that, you break things down -

  • x = 1 means that x is a variable that stores the value 1
  • y = 2 means that y is a variable that stores the value 2

Given the above, we can extrapolate to -

  • x = y means that x is now a variable that stores the value that the variable y stores.

    • You might think that x would store the string y. However, in the strings related step, you learned how strings are stored in a variable - inside of quotes. y is not a string here.

I can completely understand how this doesn’t necessarily mean that one can conclude that x will store the value that y stores. Since the content doesn’t really cover this explicitly, it can be difficult for beginners to grasp that concept intuitively.

This is where the print() function can help you. You have the code, just print things out.

If you run the following -

x = 1
y = 2
x = y
print(x)

You would see that x stores 2 and not 1 and the only way it could store a 2 is because the variable y stores a 2. From this, you could conclude that x = y results in x being updated to whatever value that y stores.

You could also try to confirm this by changing the values -

x = 1
y = 2123
x = y
print(x)

And the above would print out 2123 which would have confirmed it.

Alternatively, you also learned that you can update the numerical value stored in a variable as -

x = x + 70

The above implies that you can use an existing variable to update the value of an existing variable. You could modify the above as

x = y + 70

And that should work because y also is a variable that stores a numeric value. Or, at least, you can try the above out, print it and confirm it yourself.

So, you could infer things by just running and/or modifying the code and seeing what happens.

The reason I am explaining the above is that learning to learn is a skill in itself. You can break things down and try things out yourself and connect different concepts/contexts together to understand something.

Use these practice problems not as a way to think “the content never taught me that” but instead try to think “oh, I didn’t know we could do it this way”. Think of it as continuously adding to what you learn because the content, unfortunately, can’t cover everything. And practising this as a skill can definitely help more later when the topics become more complex.

However, as I said, I understand how overwhelming these things can be especially for beginners and I am definitely biased with my suggested approach above because I am more experienced with the language. So, feel free to provide feedback to them directly about this through that ? button as I pointed out.

1 Like

Thanks!!! Sorry to get back to you so late. The above explanation and suggestions for learning this material really help!!

the_doctor. It’s computational thinking that you’re suggesting? Is there any material that I can use to help me develop this way of solving problems? Book, videos, etc? Thanks.

To some extent, I guess so. You could consider there being some common points. But essentially it’s just trying to

  • break problems down into sub-problems
  • print things out and play with them
  • ask questions

There really isn’t any sort of “rule book” to follow as per me, but the above three can be important. Especially the 2nd and 3rd ones. The more you play with the code and try to learn from it, the stronger your intuition would be over time. The more you ask questions, the more you will be able to connect different concepts/contexts together.

So, just keeping moving forward, learn, have fun and keep practising. Maybe my post here might also help - Getting started with thinking programmatically

There are more articles by fellow community members that can help you further I think - https://community.dataquest.io/c/dataquest-direct/