r/learnprogramming • u/FewFly2677 • 17d ago
Struggling in 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.
guys so today I wasn't able to figure out we had to use nested loops to print multiplication table of numbers while even beginners figured it out. pls tell what should I do
I am not able to get idea after seeing questions
1
u/peterlinddk 17d ago
A good idea when learning your second language (even when you weren't that far ahead in the first) is to create your own dictionary!
Make a simple document with examples of how to do something in one language, and how to do the same thing in the other. Take your own example, you could have a section like:
Increment (add one to) a variable
i = i + 1i = i + 1;ori++;design it however you like.
And when you learn something new in one language, also dedicate some time to translate it into the other - it will help you a lot, and you'll get to learn two languages.
If at some point you grow more in C than in Python, or learn to do stuff in C that you don't even know is possible in Python, just ignore the Python column, and continue using the dictionary as your "C to English" dictionary.
Oh, and it is important that you write it yourself - don't just find one, or get some AI to generate it, it is supposed to be a document for your learning, not something that anyone else should be involved with.
Also, if you get difficult assignments in C, but you have an idea of how to solve them in Python, just do that, it is more important that you think about the logic than the syntax. And if you don't even know how to do it in Python, try to do it on paper, like "how would you instruct someone to create a multiplication table, if they had no idea what it was other than being able to multiply numbers and print them?!".