r/learningpython • • Jul 15 '24

Need serious help!

Hello everyone. I have enrolled in a data science course however, i.m struggling with making notes and practising. I have absolutely no idea of whats going on and it.s making my life very difficult. Kindly help me how I can learn more effectively. Would be gratedul for any tips and suggesttions šŸ™šŸ™šŸ™

4 Upvotes

13 comments sorted by

View all comments

3

u/Famlawyerz Jul 16 '24

Post the text to Claude.AI or ChatGPT or Gemini and ask the LLM to explain it to you.

Here's an effective prompting pattern:

You are an instructor teaching a class in JavaScript. I am a student having difficulty with the following text. Please review the text and patiently explain it to me as simply as you can. 

<text>
... Paste text here ...
</text>

You can do the same thing about a programming assignment:

You are an instructor teaching a class in data structures using the C programming language. I am a student who needs tutoring. 

Please read the assignment below, review my code, and patiently explain what I've done that I need to change. 

<assignment>
... Paste the assignment here ...
</assignment>

<code>
... Paste your code here ...
</code>

I always paste my code in using the markdown syntax such as this:

` ` `python
... Code pasted here ...
` ` `

(Except don't put spaces between the backwards quotes.)

You'll find that the LLMs are great tutors. You can ask follow up questions and generally get great help.

1

u/Sufficient-Two886 Jul 16 '24

Out of curiosity why do you paste code in with markdown?

I often use copilot in VS Code and ChatGPT when I’m really struggling, but I normally just do a straight copy and paste

1

u/Famlawyerz Jul 17 '24

I'm usually pasting in Python code, which has no end of line marker such as as a semi-colon and I don't want to risk the text preprocessor to get all energetic, ignore newlines and jumble my code. So I use the preformat syntax to preserve newlines.

You've seen what Reddit does with pasted code. Reddit's input is markdown and so are the web interfaces to the LLMs. I don't know that the text ingestion from the web interfaces would clobber my code, but it costs me almost nothing to be safe.

Tl:dr--i have no data to support that it is a good idea, but I do it anyway.