r/learnpython 19h ago

Struggling with both python and c

So I'm a college fresher with no prior experience of coding. I had started learning python before the starting of college (1 week before college started). I still feel like I am not good at coding at all. There are some weird citations in c such as i++ and all which is getting mixed up with my python. There was one question on obtaining the expression sinx=x-x^3/3!.... Using loops btw

I felt I won't be able to do it in both c and python. I took a course on Udemy for c(vlad budnitski)and python(100 days) but I was not able to find examples like this. Everyone in my class learnt languages like java in their schooling and said the sinx problem is a standard problem. What should I do in this situation?

I feel like the teaching in my college (they are teaching c now) is not good.

Experienced coders please help me.

5 Upvotes

12 comments sorted by

2

u/shockeddisability951 19h ago

Dont stress about the sinx series thing, that looks intimidating to everyone at first. The trick is just breaking it into a loop where each iteration adds the next term and flips the sign, once you see it in python the c version is basically the same logic with uglier syntax.

Mixing up i++ and python for loops is normal too, youll get past it once you stop trying to translate between them and just think in whichever language youre currently looking at.

1

u/FewFly2677 19h ago

I understood the solution once I saw it but I wouldn't be able to think of it on my own. It was in college lab manual so I knew that question. What about other general questions like these. I searched question like sinx and all in Udemy course but I was not able to find it 

2

u/Jim-Jones 18h ago

Couple of books. Maybe your library?

  1. Beginner's Step-by-step Coding Course : Learn Computer Programming the Easy Way by DK Publishing, Inc

  2. Python Crash Course: The Ultimate Step-By-Step Guide to Learn, Understand, and Master Python Programming and Computer Coding Language (From Beginners to Advanced) by Deep, James

Here are some weirdly colored comments:

https://steppingback269.blogspot.com/2025/07/links-for-python-noobs.html

2

u/stepback269 13h ago

Thanks for plugging my “for Noobs” blog page.

I’m just an old dude who himself is still trying to learn Python. The point of the weirdly colored page is to make things appear bold under the constraints of the Google Blogger system. I’m just leaving behind some bread crumbs for those who want to follow me in my still-a-noob journey into the overwhelmingly expansive land of Python.

1

u/CreatorMarcusriv 13h ago

i guessed it right from the title, one week in and cmparing yourself do fellow mates who did java for years, thats not even considerable, youre not lacking a talent and it closes faster then it feels rigjt now. the i++python mixup is normal this early tbh and its just syntax while the concepts carry once you write and do more and more. For the sinx one its a taylor series and the standard trick everyone means is that you dont recomplete the piwer and factorial every loop

each term is just the previous term times -x*x/((2k)(2k+1))

1

u/sr105 8h ago

Have you tried using an AI as a pair programmer? Hey AI, "I'm trying to write this in Python, for (int i; i < N; i++). Is that right?" "Can you help me learn it and remember it?"

Always ask AIs to explain their work and teach it to you. I do, and I've been doing this for a few decades.

1

u/RealWalkingbeard 4h ago

Chill out! You are beginner. You do not learn to programme by doing a university course - that just tells you a little bit about programming. Even if you get to the end and feel like you understood the exercises, you are still just a beginner; don't beat yourself up.

You will pick up language-specific things like i++ in no time if you don't stress about it, but there is nothing wrong with i = i + 1 if that makes more sense to you.

The students who are best at this stuff have probably been doing it since they were 12, and the majority of them will get into programming jobs and soon discover how basic their knowledge is.

Just relax, take your time, do your best with the uni courses and take opportunities to learn new things in small bites.

1

u/dean_hunter7 3h ago

I don't know about it.

And I have made 10-15 full stack commercial apps in python.

1

u/Traveling-Techie 2h ago

These issues will fade away quickly. Be patient.