Posted by Marta on December 29, 2020 Viewed 2043 times
Starting out with python or programming can be intimidating. So many resources that it is difficult to know the right path. I will start introducing the basic concepts, print, variable, input, conditionals(if-else), for loops, while loops, functions, import modules and some code challenges. Then some data structures and object oriented programming.
The concepts are the same for most programming languages. In other words, all these concepts are transferable for any language. Python is a good language for beginners as it is quite concise, less code to do something. Java is also a good language a bit more complex. My advice would be start programming with Python, you can always learn Java later. Once you know one language learning the second one is much easier because you understand all programming basics.
The basics concepts are the same for most programming languages so no matter what language you use to start learning, the basic concepts will be useful. It will speed up the learning of a second language.
These is an introduction to the fundamental concepts that you should learn:
print('Message to print on the console')
name_variable = 'Marta' number_variable = 2 decimal_num_variable = 2.05
age = input('Please enter your age:') print('The age entered is: ' + age)
if(age<18): print('You are under 18') else: print('You are 18 or older')
print('Multiplication Table') for index in range(0,11): print('2 x '+ str(index) + ' = ' + str(2*index)) # Same with a while loop index = 0 while(index<11): print('2 x '+ str(index) + ' = ' + str(2*index)) index = index + 1
def print_multiplication_table(num): print('Multiplication Table') for index in range(0,11): print(str(num)+ ' x '+ str(index) + ' = ' + str(num*index)) print_multiplication_table(2) print_multiplication_table(4)
Once you understand the basics concepts and know how to use them in your preferred language, it is time to practice. There are many sites on the internet where you can find code challenges for beginners and start practicing. One that I would recommend is HackerRank
There are thousand of exercises for different languages and levels and you don’t need to install any software in your computer. Just sign up, completely free, and you are ready to start. Actually companies use this sites to send code challenges to software engineer candidates, so it is the perfect place to start.
You picked your language, you understand the basics and you have done some coding challenges and you are confident about what you learnt. Where do you go from there?
Time to learn data structures! but…what are data structures? It’s basically a variable, but more complex. Instead of containing one value, it might contain a several values. Those values might be same type, for instance, all numbers, or texts. You can also organise them in different ways, order them alphabetically, or save them by the order in which you received them. Some very common data structures are arrays, list, queues, stacks , tree and there are more.
After covering data structures, next stop will be object oriented programming. OOP basically means that instead of using just the variable types provided by python, also known as primitives, you will create your own types. For instance you can create an object Person, which will contain two data, the name and the age.
Python and Java are both really popular languages, and both are in huge demand. I have been a java developer for 10 years and I constantly get calls from recruiters offering jobs. Plus it is quite well paid. If you learn both languages, or one of them, I can assure you, you will have a job for many years, unless an asteroid falls on earth and computers disappear!
Although both are good I will start with Python, just because it is much more intuitive, therefore you will learn it faster. Plus it is more concise, so less code to achieve the same thing.Once you are confident with python, you can always learn Java.
The reason I advise to consider learning two languages is that when you learn another language your understanding will expand, since you will see two ways of achieving the same thing. I know it is a bit more work, however it’s worthy since your knowledge will be more solid. Plus it shows your interest in programming. Quite impressive in prospect of your future interviews.
I hope this article gave you a clear roadmap of the steps you can follow to start programming. I think this is achievable in 1-3 months. Please let me know if you try this. How long did it take you? Or have you already done it, if so how did it go? Please feel free to leave comment below sharing your experience! 🙂
If you like the article and you would like to be notified when I publish more articles feel free to follow, give it a like or subscribe.
Steady pace book with lots of worked examples. Starting with the basics, and moving to projects, data visualisation, and web applications
Unique lay-out and teaching programming style helping new concepts stick in your memory
Great guide for those who want to improve their skills when writing python code. Easy to understand. Many practical examples
Perfect Boook for anyone who has an alright knowledge of Java and wants to take it to the next level.
Excellent read for anyone who already know how to program and want to learn Best Practices
Perfect book for anyone transitioning into the mid/mid-senior developer level
Great book and probably the best way to practice for interview. Some really good information on how to perform an interview. Code Example in Java