Why Am I Struggling to Learn Python After C++?

0
4
Asked By CuriousCoder42 On

I've been learning programming for about a year now, starting with an intro to C++ class. I did pretty well with it and grasped the concepts fairly easily. However, I've recently transferred to a university where all classes are taught in Python, and I've found it really challenging. I've completed one Python class, but I barely managed to keep up and still feel completely lost. I'm currently using "Automate the Boring Stuff with Python" and while I understand the concepts, I freeze up when trying to write even simple programs. In C++, I was comfortable creating basic programs that included functions and file handling. But now, I can't even iterate through a list or insert items in Python without struggling. I feel like I'm missing something fundamental that's blocking my understanding of this language.

5 Answers

Answered By SyntaxSavant77 On

Don't stress too much! The differences in programming paradigms can make it hard to switch gears. Python is more focused on high-level abstractions compared to C++, which is more about managing memory. If you keep a clear mental model of each language, it’ll help you focus on Python's unique features.

Answered By LearningCurve21 On

It might feel overwhelming now, but remember that learning to code is all about logic design. Python's abstract nature can be tough if you're used to C++. If you can, try to find a mentor or a friend who can guide you through the concepts. And don't underestimate self-practice; the more you code, the easier it'll get!

CuriousCoder42 -

A mentor would be amazing! But since I'm doing this online, it's hard to find someone to help who can explain things one-on-one.

Answered By TechWhiz23 On

When you're writing Python code, try to think more in terms of the language's design. For instance, Python relies heavily on indentation instead of curly braces, and understanding how lists and data structures work differently than in C++ can help clear up some confusion. Don't hesitate to practice basic loops and list manipulations; they can be a little different between the two languages!

CuriousCoder42 -

I had a hard time with looping too! I was trying to write loops that summed up user-defined ranges, and it took me forever to figure it out — it just feels different in Python.

Answered By DevGuru91 On

Transitioning languages takes time. Honestly, I've been a professional Python developer for over a decade and I have my gripes about Python. Just stick with it—if your curriculum requires it, you just have to keep practicing to overcome those hurdles.

CuriousCoder42 -

What don't you like about Python, though? I'm curious! What makes it tough for you?

StudentScribe99 -

That's interesting to hear! What do you find more enjoyable than Python?

Answered By CodeNinja88 On

Switching from C-based languages like C++ to Python can be tricky since the syntax is so different. It might help to keep practicing the basic syntax, especially for loops and data structures—even seasoned developers occasionally have to look things up!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.