What is Python?

Python is an interpreted, high-level, general-purpose programming language. Created by Guido van Rossum and first released in 1991, Python’s design philosophy emphasizes code readability with its notable use of significant whitespace.

What are the advantages of Python?

The Python language has diversified application in the software development companies such as in gaming, web frameworks and applications, language development, prototyping, graphic design applications, etc. This provides the language a higher plethora over other programming languages used in the industry. Some of its advantages are:

  • Extensive Support Libraries
  • Integration Feature
  • Improved Programmer’s Productivity
  • With its strong process integration features, unit testing framework and enhanced control capabilities contribute towards the increased speed for most applications and productivity of applications. It is a great option for building scalable multi-protocol network applications.

What are the disadvantages of Python?

As an interpreted language, Python has a slow speed of execution. It is slower than C and C++ because it works with an interpreter, not the compiler. In spite of all the disadvantages of Python programming language, it has a lot more pros than cons.

Simple tutorial

These are the basic commands you can use with Python. If it’s your first time, this will be the best place to start with. Python’s synthax is pretty easy, just look at this simple example.

#simple print###################################
print("Hello World!")

#create a variable and print it#################
valueToPrint = "Python is not that bad..."
print(valueToPrint)

#get the input from the user and print it#######
x = int(input("Please enter an integer:"))
print("You wrote:", x)

#conditions#####################################
if x < 0:
	print('Your value is negative')
elif x == 0:
	print('Zero')
elif x == 1:
	print('One')
else:
	print('Your value is positive and > 1')

#while loop#####################################
a = 10
b = 0

while (b < a):
	print(b)
	b = b + 1

#for loop#######################################
wordList = ['cat', 'window', 'defenestrate', 123]
for word in wordList:
	print(word)

#define a function##############################
def fibonacci(max):    # write Fibonacci series up to n
	result = []	
	a = 0
	b = 1
	while a < max:
		result.append(a)
		a, b = b, a+b
	return result

print (fibResult)
fibResult = fibonacci(2000)

If you need to download Python or just want more info, please follow this link. More articles about Pyhton on Code4Noobz.

Happy coding!  🙂