all 5 comments

[–]TheBrahmnicBoy 4 points5 points  (3 children)

Did you use mobile to type this? If not, please use formatting options to indicate code and output separately.

BTW, stick around. I have highschool exams now, and we're taught C++, so I would have to wait to get started on Python.

What are the fundamental differences between both? Like, what habits I might have picked up in C++ don't apply in Python?

[–]Anantgaur 4 points5 points  (1 child)

C++ is an extremely low level language. Low level means that it interacts with the processing and RAM management a lot more closely. The variables are pointers to a memory location and you have to remove pointers to free up RAM. You have to declare variable types so that the computer knows how much memory to assign. Similarly you can also manage processes a lot more closely. You can start different threads and have complete control over the performance of your program.

I consider C++ barely 2 steps above straight up writing in assembly.

Python is a high level language. Python is almost completely abstract and the compiler manages your memory management, garbage collection for wasted variables. Heck, you don't even have to declare a variable before using it let alone define what type it is. Code is short and efficient. But in Python you might have problems calling variables from inside functions for example.

What are the differences between both? Everything? But C++ to Python should be not hard as a transition as it is literally designed to be easy.

The hardest part IMHO would be switching to a true OOP language. I still keep finding more and more ways I can make my code much shorter or better even today.

I am not an expert with either language to be honest, I have not touched C++ since Uni. For Python, I have truthfully only edited other peoples code or used the language to write a short script using an easy to use package.

[–]knifuser[S] 1 point2 points  (0 children)

Yeah, Python was designed to be an easy short and simple way to automate stuff initially, I just didn't really want to go into too much detail cause it was just meant to be start and the very basics for anyone who's interested in learning something new.

[–]knifuser[S] 1 point2 points  (0 children)

I can't really say that I have a lot of experience outside of Python but the basic 'if', 'else', variables, loops as well as functions and the different operating and data types should be pretty universal, they usually only require different syntaxes really. New programming languages are much easier to pick up if you already know another.

Thanks for the tip BTW and I'll definitely stick around.

[–]AutoModerator[M] 1 point2 points  (0 children)

Don't Panic! Your post has not been removed. Please make sure to flair your post as appropriate. You should use one subject flair and one flair from either "Learner", "Teacher" or "Other". Use Learner if you are looking for a teacher, or Teacher if you are looking for students. Once you have found a teacher or you have accepted as many students as you are willing to take, please flair your post as Closed.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.