Elon Musk on Tesla’s Customer referral program 2019

Important announcement by elon musk

As usual, Elon musk has announced something on twitter which may important to you. If you are thinking to refer someone to buy Tesla and take the adventage of super fantastic offer –  6 months of free supercharging then you have to harry up!!

Elon Musk on Tesla referral program

Time is running very fast especially after Elon Musk’s announcement on Tesla’s customer referral program. The referral program is going to end very soon that will be on 01st Feb 2019. We are not sure if this is kind of marketing strategy to convince people to take decisions/act quick, just to not miss referral offers. 

Many people are gone mad on twitter after his announcement and everyone is asking about this sudden decision. Elon Musk has didn’t hide anything and explained genuine reason for sudden end of this program. 

Its adding too much cost to the cars, especially Model 3″


Elon Musk on Tesla customer referral program end

Any ways, if you are really thinking about this referral program but haven’t thought much yet then probably this is the time for you to think seriously, after all its all about 6 months of FREE supercharging!

Python Interactive and Script Mode programming


How to run Python Code?

There are two python programming modes you can use to submit your python programs, Python Interactive and Script Mode Programming.


An interpreter works in a same way for both the programming methods so ultimately, we get the same result. But there are few exceptions and limitations to use these methods.


If you still do not have python installed on your machine then what are you waiting for! Download Now!!


Python Programming modes:

1. Interactive Mode Python Programming

If you are using Command Prompt to write and execute python commands, then you must invoke the interpreter without any parameters. All you need to do is – write “python” and python prompt will start automatically.

Microsoft Windows [Version 10.0.17763.195]

(c) 2018 Microsoft Corporation. Med enerett.



Python 3.7.2rc1 (tags/v3.7.2rc1:75a402a217, Dec 11 2018, 23:05:39) [MSC v.1916 64 bit (AMD64)] on win32

Type “help”, “copyright”, “credits” or “license” for more information.


Type following command in your python prompt and press enter to see the result. The result will appear in next line automatically when you press ENTER.

>>> print(“This is a sample Python Program”) 

Result –

This is a sample Python Program

2. Script mode Python Programming


If you are using command prompt to execute python script, then you must invoke the interpreter with file name as parameter. You may write your python code in any editors – notepad, notepad++ but the file extension should be .py to execute the program by interpreter.

Let’s take same example and try to execute it in script mode. Your script name is blog.py and it has the same code –


print(“This is a sample Python Program”)


We assume that you have Python interpreter set in PATH variable and your file present in the same directory where you are currently at. Now, try to run this program as follows –

$ python blog.py

Your program must be present in current directory otherwise you will get this error – “python: can’t open file ‘blog.py’: [Errno 2] No such file or directory”


This script will produce same output.


This is a sample Python Program

If you want to know What is Python IDLE then brief descriptive information available here – PYTHON IDLE

a Longr Python Program

Now we’ll try to run program which has more than one-line code. When we have more than one line of code and try to execute in interpreter mode and see the result. Let’s try to print this star using
interpreter mode.

print(”   *    “)

print(”  ***   “)

print(” *****  “)

print(”  ***   “)

print(”   *    “)

If we try to enter each line one at a time into the IDLE interactive shell, the program’s output will be intermingled with the statements you type. For example –


>>> print(”   *    “)


>>> print(”  ***   “)


>>> print(” *****  “)


>>> print(”  ***   “)


>>> print(”   *    “)




In such scenario the best approach is to type all code into editor, save the program in file (star.py) and run the program. 


Most of the time we use an editor to enter and run our Python programs. The interactive interpreter is most useful for experimenting with small snippets of Python code

In this example if we run this program star.py in script mode then each print statement “draws” a horizontal slice of star.


$ python star.py




In Python programming, it is more important that no whitespace (spaces or tabs) come before the beginning of each statement. In Python the indentation of statements is significant and must be done properly. If we try to put a single space before a statement in the interactive shell, we get this ERROR.



An interpreter reports a similar error when we attempt to run a saved Python program if the code contains such extraneous indentation.


Read Mode: Python Variable, Value and Data types

Python Variable, Values and Data types

As usual in any programming language we do have Python variable, values and data types and they are essential part of our code.

Python variable

There are some specific rules must be followed when we define Variables in python. Here are those rules to define variables –

  1. Variable Name must contain at least one character.                                                         
  2. Variable Name must contain at least one character.                                                         
  3. The first character can be alphabetic letter (upper case or lower case) or the underscore.                                                                                                                                                                                                                       AxyBSNDmkerdsladCPFAEVXZkior                                                                                       
  4. The remaining characters (if any) may be alphabetic characters (upper or lower case), the underscore, or a digit.                                                                                                                                                                                   AxyBSNDmkerdsladCPFAEVXZkiorTd_02538923                                                                 
  5. No other characters (including spaces) are permitted.                                                     
  6. A reserved word cannot be used as a variable name (see below table 1.1)                  
  7. Variable names are case sensitive

Here are few examples of valid and invalid identifiers.

Valid Name    :

                           x, xY2, TekkieHead, _Myblog, _2days_BLOG, BLOG

Invalid Name :

                          5 (begins with a digit),

                          @_Blog (special characters are not allowed),

                          Tekkie%Head (special characters are not allowed),

                          Python-Program (dash is not a legal symbol in an identifier),

                          Class (reserved words are not allowed),

                          Good Read (space is not a legal symbol in an identifier)

>>> x=1000

>>> x


>>> TekkieHead=”Friend of Python”


Traceback (most recent call last):

  File “”, line 1, in

NameError: name ‘TEKKIEHEAD’ is not defined

>>> TekkieHead

‘Friend of Python’


>>> Tekkie%Head=”Special character in variale name”

  File “”, line 1

SyntaxError: can’t assign to operator


Also, there are exceptions with few words which are not special, but it happens to be Python Keywords. 

You may use it as a variable name and reassign it but be careful with sequence of your code.

Python keywords : print, str, int or type

Let’s have a look what happens, if we use python keywords as a variable name.


and del from None True
as elif global nonlocal try
assert else if not while
break except import or with
class False in pass yield
continue finally is  raise def
for lambda return    

Table 1.1


A value is one of the basic things on which your program works, like a letter or a number. The common types of values we use in our daily life as follows – Integer (Number), String (character or letter), float (numbers with decimal).

If you are not sure what exactly type of any value/variable, then you can use type (<value or variable name>) function.


The value can be assigned to variables without defining them or declaring them at first instance. Python take cares of everything when you assign the value. When we try to reassign the value from int to string, python changes the variable data types internally.

In below schematic diagram see how variable assignment and reassignment happens in Python.


Read More: Python IDLE 

SuperPutty : Change the Font Size or Background Colour



There are tons of products available to make a terminal connection to Linux server. The SuperPutty is one of them which is widely used in the IT experts. It’s more like

Putty session only but it comes with more user-friendly and wide options which helps IT experts to work more effectively.

It gives you functionality to create new different terminals and can be available as tab (similar like our browser tabs) unlikely normal putty creates separate window for each terminal.

The common problems we are facing with the SuperPutty sessions are to set up font size, background colour. When we try to adjust the font or background colour it only effective for that session. If we connect to new sessions that adjustment disappears.

If you are facing such problems with your SuperPutty then follow these instructions to set up your SuperPutty settings permanently for future sessions. 

Configure your superPuTTY

  • Launch your SuperPutty
  • Right click on session and create new PuTTY session

  • Right click on session and select “Change Settings”

  • Go to Window >> Appearance and adjust the font size

  • Go to Window >> Colour to adjust the background colour

  • Save all these changes permanently in “default session”

That’s it, when we create new session it takes all these modified setting to open putty session.

If you have any other queries regarding SuperPuTTY Settings or anything else then leave your comment in comment section below.


Read more – tips and tricks: Python if else code in one line

Python IDLE, Shell and Command Prompt

Python IDLE , Shell and Command Prompt

python IDLE – Integrated Development and Learning Environment


Python IDLE – It is an Integrated Development Environment (IDE) for python, packaged as an optional part of the python packaging. IDLE is completely written in  python and the Tkinter GUI toolkit (wrapper functions for Tcl/Tk).


IDLE is intended to be simple IDE and suitable for beginners, especially in the education environment where people want to play with the Python!


  • Multi-window text editor with syntax highlighting, auto-completion, smart indent and other.
  • Python shell with syntax highlighting.
  • Integrated debugger with stepping, persistent breakpoints, and call stack visibility.

Python 3.7 Interpreter

If you have python installed on your machine, then you will find the python executable file python.exe present at your installation directory …//python37/python.exe

If you don’t have python installed then follow this instructions to 

download and install Python

To launch the python interpreter, navigate to python.exe file and execute it. Alternative and easy way to launch interpreter would be simply search “python” or “IDLE” from your home window and launch it. You can run your python command from its interpreter window directly.


Python interpreter 37
Python IDLE


IDLE has two main window types- the Shell window and the Editor window. Shell window is a default one where you can fire python commands and see the output in the same window – just below your command. 

There is limitation to use Shell window, you cannot write multiple lines of code at one go and execute it. It only allows us to write single line of code and execute it.



Python shell is an awesome environment to work on simple commands. You can write command and just press enter to see the instant result. It also useful when you are not sure or want to check specific command or syntax.


>>> 10+40


>>> print(“Bye Byee……”)

Bye Byee……


Python shell version 37
Python IDLE


Python IDLE Shell


The IDLE provides us separate editor window to write your n-lines of code, save it and run it. 


How to open IDLE Editor: As mentioned earlier, IDLE by default opens the shell window, if you want to open editor window then follow these steps.

  1. Open IDLE shell window (which is default one)
  2. Go to “File”>> “New file”
  3. New editor window will open automatically.
  4. Write your program and save it with .py extension.

Python idle editor


If you have python program saved in your computer, then you can simply right click on that file and say, Edit with IDLE

Python IDLE

How to run code in IDLE?


Once you have your program ready, save your program in any directory and execute the program from top bar of window. 

You can see many options available on top of window like – File, Edit, Format, Run, Options, Windows, and Help.


You can run your program by selecting “Run” >> “Run Module” or just press “F5”. The output of your program will appear in the background “Python 3.7 Shell” window. 

If your shell window is not open at that time, then the moment you click on “run module” or press- F5 shell window will automatically open with you program output.


python idle run module

Configure iDLE

You can configure your code environment by setting up your favourite font size, colour adjustment and many more. All these settings you will find it in IDLE editor“Options>> Configure IDLE”


python idle configure


How to run python code in command prompt?

There is another way of running your python code and that is through command prompt window.

If you have python installed on your machine (windows, Linux/Unix or Mac OS) you can run python interpreter through Command prompt. Go to Home window, search “cmd” and open the command prompt window.


Use Command Prompt as a shell


Type “python” to start python interpreter and enter into python shell environment where you can write commands and see the output instantly similar to shell window we saw in previous section.

The moment you enter “python” on cmd, it  also prints python interpreter details before enter into shell mode which shows installed python version details.



Python 3.7.2rc1 (tags/v3.7.2rc1:75a402a217, Dec 11 2018, 23:05:39) [MSC v.1916 64 bit (AMD64)] on win32

python command prompt

Run Python code directly from command prompt

There is also possibility to run whole python program from command prompt without entering shell mode. For this, first you need to write your code using any application like notepad and save it with .py extension.

You can invoke python interpreter using py or python command.


py  /file_path/filename.py

python /file_path/filename.py



python Shell cmd

What is Python?

what is python

what is python?

What is Python ? It is a high-level, structured, open-source programming language that can be used for a wide variety of programming tasks. Python was created by Guido Van Rossum in the early 1990s, its following has grown steadily & programmers are getting attracted day by day.



It is very user-friendly language, its syntax very much similar with what we write in English with some programming rules. It’s an interpreted language, it reads a high-level program and executes it, meaning that it does what the program says.



When we say it is open source it means, it is freely available on internet to download and get started with. You can download and install Python from its official website. In addition, some third-parties offer re-packaged versions of Python that add commonly used libraries and other features to ease setup for common use cases, such as math, data analysis or scientific use.


Features of Python

Python features a dynamic type system and automatic memory management and supports multiple programming paradigms, including object-oriented, imperative, functional programming, and procedural styles. It has a large and comprehensive standard library.

Easy to Learn: It is very simple and easy to learn language with knowing some basic programming concept, but it is not monetary. You can start with Python from scratch.


Easy to read: It is meant to be an easily readable language. Its formatting is visually uncluttered, and it often uses English keywords whereas other languages use punctuation.


High-level Language: A programming language like Python that is designed to be easy for humans to read and write.


Indentation: Python uses whitespace indentation, rather than curly brackets or keywords, to delimit blocks. This feature is also sometimes termed the off-side rule.


Interpret: To execute a program in a high-level language by translating it one line at a time.


Interactive: Python is very interactive & user-friendly programming language. You can interact with your program using python shell interface.


Multi-paradigm: Python supports functional & structural programming methods as well as Object Oriented known as a multi paradigm programming language.


Integrated:  It can be easily integrated with C, C++, COM, ActiveX, CORBA, and Java.


History of Python

Python is an open source programming language that was made to be easy-to-read and powerful. A Dutch programmer named Guido van Rossum made Python in 1991. He named it after the television show Monty Python’s Flying Circus.


The language’s core philosophy is summarized in the document The Zen of Python (PEP 20), which includes –

• Beautiful is better than ugly

• Explicit is better than implicit

• Simple is better than complex

• Complex is better than complicated

• Readability counts

There are major two versions of python available now (Year2018) that is, python 2.X and 3.X. Python 2.0 was released on 16 October 2000 and Python 3.0 (initially called Python 3000 or py3k) was released on 3 December 2008 after a long testing period. Python 3.X is a major revision of the language that is not completely backward-compatible with previous versions 2.X

Python Release Notes

List of python releases, you can opt any version and directly install on your computer. Installables are available on its official website python.org. Always prefer to install latest version of software which has upgraded functionality.

Python Version 3.x & 2.x

[table id=2 /]

Python is used for?

Python is used by hundreds of thousands of programmers and is used in many places. Sometimes only Python code is used for a program, but most of the time it is used to do simple jobs while another programming language is used to do more complicated tasks.

It has wide varieties of standard libraries made up of many functions that come with Python when it is installed. These libraries make it a powerful language. On the Internet there are many other libraries available that make it possible for the Python language to do more things.
Areas where python is often used:

  • Web development
  • Game programming
  • Desktop GUIs
  • Scientific programming
  • Network programming

Fun with Python

Writing python program is itself having a fun, you will get know how when you explore more python world. Here we start with our first program in python. You can write same python program in many ways as per your programming structure with same output. 

This is the first simple python program to print “Hello World!!”

print(“Hello World!”)


# This code does the same thing, only it is longer:


ready = True

if ready:

    print(“Hello World!”)

You can create variables and assign any values – number or string to them, even you reassign them multiple times at any point in your program without worrying how it internally works. 

Python is super awesome when it comes to variable assignment and memory management. 

For brief description about variables & data types in python take a look at my other post.

print(“Thanks for visiting www.tekkiehead.com”)


What do you think about Python?-(read again). Let me know here in comment section below!

Read More: What is Python IDLE, Shell and Command prompt

Python – Home

Python is easy to use, powerful, and versatile, making it a great choice for beginners. The readability of python code makes it great first programming language. It allows you to more concentrate on your logic instead of mysterious syntax like any other language as syntax is very simple and user friendly.

Python is a multi-paradigm, Object-oriented and structured programming language. It is an interpreted high-level programming language for general-purpose programming. Created by Guido van Rossum and first released in 1991, Python has a design philosophy that emphasizes code readability, notably using significant whitespace known as interpreter.

On the origins of Python, Van Rossum wrote in 1996:

…In December 1989, I was looking for a “hobby” programming project that would keep me occupied during the week around Christmas. My office … would be closed, but I had a home computer, and not much else on my hands. I decided to write an interpreter for the new scripting language I had been thinking about lately: a descendant of ABC that would appeal to Unix/C hackers. I chose Python as a working title for the project, being in a slightly irreverent mood (and a big fan of Monty Python’s Flying Circus).

— Guido van Rossum

New To Python?

If you haven’t programmed before or simply interested in learning another language, we have the resources to help you GET STARTED... Take a look at our comprehensive guide that introduces you to the basics of the language, and then takes you all the way through solving complex problems using python programming.

Prerequisite for Python

It would be very helpful to get started with python if you know the basic concepts of programming like variables, datatypes, functions, loops etc but it is not mandatory. If you are really interested in programming and want to start somewhere then you are on right place – Python would be great choice considering future technologies – Artificial Programming, Machine learning, Deep learning etc.

Programming Index

Many people are very curious about code. Unfortunately, choosing of programming language can be very difficult task because of scattered/lack of information available with us. The simplified general guidelines for making a good decision to choose “your programming language” may look at “The Programming index”. The index can be used to check whether your programming skills are still up to date or to make a strategic decision about what programming language should be adopted.

Measures of Programming language

There are plenty of resources available on internet which claims various different programming languages at different spots. There could be n- numbers of parameter on which languages are being indexed, each subject to a different bias over what is measured, have been proposed. Here are the few parameters – 

  •  The number of times language name is appeared on web searches.
  •  The simplicity of the language.
  • The number of programming jobs available at the moment. 
  • The number of projects in that language on SourceForge, and GitHub
  • The number of books sold that teach or describe the language

The most preferable and considerable places on internet to see the programming Index are TIOBE programming community, PYPL PopularitY of Programming Language, IEEE Spectrum ranking, Redmonk ranking etc. So let’s start with what they say…

TIOBE (The Importance of Being Earnest) Index

According to the site, TIOBE index is “not about the best programming language or the language in which most lines of code have been written”. However the site does claim that the number of web pages may reflect the number of skilled engineers, courses and jobs worldwide.

TIOBE Community Index

The ratings are calculated by counting hits of the most popular search engines. The search query that is used is +” programming”

There are 25 search engines like Google, Google Blogs, MSN, Yahoo, and Baidu etc. that are used to calculate the TIOBE index. The index is updated once a month.

TIOBE : Top 12 Programming Language

PYPL (PopularitY of Programming Language) Index

The PYPL PopularitY of Programming Language Index is created by analyzing how often language tutorials are searched on Google. The row data comes from the Google trends.
The PYPL Popularity of Programming Language index can help you decide which language to study, or which one to use in a new software project.
According to latest release note – worldwide, Python is the most popular language. Python grew the most in the last 5 years (14.3%).

PYPL Index

IEEE Spectrum Ranking

The starting from a list of over 300 programming languages the row data gathered from GitHub, Google Search and Trends, Twitter, Stack Overflow, Reddit, Hacker News, Career Builder, Dice.com, and IEEE Xplore Digital Library.

It also gives you the most personalized ranking. The interactive interface allows us to filter by search trends, job trends, or open source community trends or you can modify the weighting of each dimension, enabling an extremely personalized ranking.

IEEE Spectrum Ranking​

Looking forward….

Considering the current trend in all aspects, I would strongly recommend to start with C/C++ and jump into the future technologies – Artificial Intelligence (AI), Machine Learning (ML) and Deep learning world!! These are very broad concepts but you can begins with the Python Programming which very simple, realistic and of course most demanding language at the moment. You may check my future blog post for python programming.

Good luck in your coding journey!!

Give me your thoughts on the rankings in the comments below.

references: tiobe.com, spectrum.ieee.org, pypl.github.io