Hey everyone,
I have done a little bit of Python already, but I took a break from it and am deciding if I should continue with it, or try to learn C.
I am an aspiring electrical or aerospace engineer, so I know Python will be helpful for me in that sense. But I also know that learning lower level languages may be better for me if I wanted to do electrical engineering, as well as creating code for microcontrollers for my 3d printed rocket.
I am interested in ai/ml, so I would like to know Python, but I am also interested in electronics, so I’m confused what to start with.
Thank you.
Videos
I'm fully new to programming and have been doing research on what a good first language to choose is. For the most part, I have seen Python and C. I do plan on learning both but I don't know what to start with. What are the pros and cons of starting with each? Which one trains universal programming skills better? What do you recommend?
I'm a beginner in programming and I saw several people saying that it will be easier to learn Python or any other programming language to start by learning the basics (C). Does it really make a difference?
In my opinion it's better to start learning Python.
I found it easier to learn then C or C++. It has libraries to do virtually anything you might need, and can do essentially anything.
The only reason to use a more difficult language like C/C++ is if you need the performance or are writing code for an embedded system. They are not, however, what you should be learning initially.
C# is a fine language, but nothing beats Python for ease of use.
The scope of Python is quite broad, here are some examples:
- Create a website (Django, etc.)
- Create scripts to do tasks ranging from image manipulation to server maintenance
- Create GUIs (Tkinter, etc.)
- Create games (pygame)
- Scientific computing (SciPy)
Python can interact directly with arbitrary C code, meaning anything which can be done in C, can be done in Python with a little work. Python is popular enough that an interface has been created for virtually everything already.
For a better look at what can be done with python out of the box, take a look at the standard library which comes with python: http://docs.python.org/library/
In short, if it can be done with a computer, and doesn't require the speed of C/C++, it can be done with Python.
I would say it depends on what you want to achieve (cheesy answer...)
The truth is, learning language is a long process. If you plan on learning a language as a step toward learning another language, you're probably wasting your time.
It takes a good year to be proficient with C++, and that is with basic knowledge of algorithms and object concepts. And I only mean proficient, meaning you can get things done, but certainly not expert or anything.
So the real question is, do you want to spend a year learning C++ before beginning to learn Python ?
If the ultimate goal is to program in Python... it doesn't seem worth it.
The question is actually more complex than it might appear, and really the answer can depend on the context. For example, at what age are the students when they are first taught to program? Is this in Primary School, High School or part of an undergraduate programme? The answer might be different in each case.
It also depends on the purpose of teaching the initial programming language (IPL). Is the purpose to lead towards a practical skill (vocational programming), or is it to enable the teaching of some knowledge of algorithms (pedagogic programming), is it to enable the functioning of some devices (engineering programming) or is it to prepare students for further study? Each of these questions could lead to a different language as an IPL.
For a very early age start of programming one does not have to worry about employment or future curricula so something engaging is important, so tools such as MIT Scratch have a role. For later childhood Python fills a nice niche, particularly as it can run on a wide variety of inexpensive platforms (such as Arduino's, Raspberry Pi and so forth) which provides accessibility and make it within the reach of the classroom and individual students.
Conversely, if one is looking at an undergraduate IPL then it may depend on which degree programme is being considered. Is it a degree in Computer Science, Engineering, Biology, Chemistry or Physics? One would then need to take into account what graduate employers might be looking for and tailor to that market.
Python might have value in some of these programs but the students would also have to learn other languages at some point. For example, Computer Scientists would need a wider experience that would embrace C#, C++ (among others). Electronic Engineers might need C, but Computer Scientists less so. Biologists might need R, Chemists and Physicists might still need Fortran!
However, I would say that I might never recommend C as an IPL, and would start at C++ even for the most hardened Electrical Engineer. I only show Computer Science students C in specific contexts (like working with flex and bison)!
One thing I say to my students in the course where I look at Languages is that there is no one best language. The choice of language for any particular situation is so very context dependent on resources available, skills available, the purpose of the programming and the end goal of the task, and for an IPL that advice still holds true.
I started teaching Python at NCSSM in 2004. Here are some reasons I chose it.
It is direct and simple, and there is not a whole ton of boilerplate to deal with at the beginning. Hello, World looks like this
print("Hello, World")
We all know what it looks like in Java (enclosing class needed) and C.
Delimitation occurs via whitespace. Students who begin with Python tend to have excellent formatting habits when they learn other languages, because Python requires them. There is a direct visual connection between the flow of a program and its appearance.
It's a professional tool. Students don't "outgrow" Python. It has a rich standard library and numerous third-party libraries that make it an awesome tool.
It supports OO, functional, and imperative programming paradigms
Memory management on the heap is largely abstracted away.
The built-in types provide a significant creative palette. We teach our students to "use wheels, not re-invent them." An exception to this is when we are "dissecting" something to gain an understanding of how it works.
It runs on everything and web interfaces for it are freely available.
Long experience shows that Python is an excellent language for beginners.
C is not great for beginners. However, it is very important. In many ways it is the "Latin" of computer languages. Every programmer should know it, because it lurks beneath the surface in so many places. We teach it to students who are already proficient programmers.
I am a high school student. I want to become a "good" software engineer in future. I want to learn programming due to my interest in computers and technology. I don't have any specific goal or interest, like web development or any other.
Some say to start with Python, as it will help to start easier, then learn other languages.
Some say to start with C, as it will teach me basics of programming and will make it easier to learn other languages. Python will make it difficult to learn complex languages, like C++, and I will learn bad habits from Python, as it is very easy.
I know I may be wrong, but I don't have much knowledge about programming. Please help me decide between Python and C.
I am a senior in high school, and I have already applied & gotten accepted into EE Majors at a few schools. I've taken engineering class for 4 years and have slight experience with robotics but almost zero with coding. I trust that I will learn programming necessary for my career in school, but I want to learn C now to create projects with Arduino. Everywhere I look it seems like Python is the best language for complete beginners, but it doesn't seem to match what I had in mind like C does. Is it worth it to learn Python first? Or should I just go straight to C???