Python is a scripting language?
I was introduced to Python very late in life, I considered it too easy to get over.
As I continued my internship at Summer of Bitcoin, I had some tasks related to python knowledge, I gave in and started finding resources for the same.
Luckily my favourite teacher, Hitesh Choudhary sir has a whole playlist on it, this blog is the assignment my guru has given to me.
Why Python?
Python is the most strong contender in the number game, I mean it can calculate stuff really fast in it's shell. Huh, I was astonished when Python was able to find power of 2^1000 in milliseconds.
>>> 2 ** 1000
1071508607186267320948425049060001810561404811705533607443750388370351051124936122493198378815695858127594
6729175531468251871452856923140435984577574698574803934567774824230985421074605062371141877954182153046474
983581941267398767559165543946077062914571196477686542167660429831652624386837205668069376
>>> WOW!!
Inner working of Python
How is Python able to do it so fast, the secret lies in the concept of Virtual Machines.
That was introduced by the old faithful Java language, this concept of creating a byte code before running the actual code is really life changing and introduction of a SHELL combines python to be a super power in the number game.
Hitesh Sir taught me:
Shell and Virtual Machine keep on working in background when we save the file and shows us results and keeps checking for error.
number = int(input("Please Enter any Number: "))
print("The List of Natural Numbers from 1 to {0} are".format(number))
for i in range(1, number + 1):
print (i, end = ' ')
This .py code will get go to interpreter that consists of 2 things:
Compiler
Virtual Machine
Compiler compiles the code to Bytecode, with a .pyc extension name and this file is passed on to virtual machine that runs it and we get out put on the screen.
Thanks to GFG for this picture.
Conclusion
I am pretty new to blogging, please cope with me but I really love teaching people new stuff.
I'll deep dive more into python and share what I learn.
Thanks for Reading.
If you reached till here: Here's a Gift for you.
Resources Used
Subscribe to my newsletter
Read articles from Saksham Gupta directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Saksham Gupta
Saksham Gupta
Web Developer and Content Creator