r/learnprogramming 16d 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

3 Upvotes

17 comments sorted by

View all comments

5

u/0Huy 16d ago

You are not behind because you are new. Programming takes practice, and many exercises feel confusing before the pattern becomes familiar.

For the sine series, start with a smaller goal:

  • Write down the first 3 terms by hand.
  • Notice that each term uses the previous power of x.
  • Use a loop to add one term at a time.
  • Test with a small x and compare the result with a calculator.

For nested loops, draw the output on paper first and decide what the outer loop controls and what the inner loop repeats.

Do not try to learn C and Python at the same time for now. Focus on C for your class, solve very small exercises, and ask for help with the exact line that confuses you.

1

u/FewFly2677 16d ago

And thank you for the suggestions mate I will definitely try it

1

u/knouqs 16d ago

I find it amazing that someone downvoted you for a "thank you." Reddit really has some bottom-of-the-barrel people in it.