Posts

Snake, Water and Gun game in python

here ,       we are going to make a console game in python. This is a very interesting game that we were play in our childhood. The code of game is given below: import  random # Snake Water Gun or Rock Paper Scissors def   gameWin ( comp ,  you ):      # If two values are equal, declare a tie!      if  comp == you:          return   None      # Check for all possibilities when computer chose s      elif  comp ==  's' :          if  you== 'w' :              return   False          elif  you== 'g' :       ...

What Features Does Python Offer?

Image
Python is often comparable to Perl, Ruby, PHP, Scheme, and Java. This is because it is is an incredibly powerful object-oriented language.    Python also has several notable features which make it an enticing language to work with for developers. 1) Python makes use of an elegant syntax, meaning the programs you write are much easier to read. This is because they are closer to the human language, or how we write our words, instead of a language that computers use to read and interpret code. For example, the "print" command will display anything proceeding it - and in quotes - at runtime. 2) Python is simple and easy-to-use, which means that it's much easier to get your programs up and running. That is why Python is considered ideal for prototype development and similar ad-hoc programming tasks. It does not compromise maintainability either. 3) It comes with the Standard Python Library , offering integrated support for a variety of common programming ta...

How to Setup Python Environment

Image
One of the most important things you'll do when working with any programming language is setup a development environment which allows you to execute the code you write. Without this, you will never be able to check your work and see if your website or application is free of syntax errors. With Python, you also need something called an interpreter that converts your code - which makes up the entirety of your application - to something the computer can read and execute. Without this interpreter, you'll have no way to run your code. To convert your code, you must first use a Python shell, which calls upon the interpreter through something called a "bang" line. As for creating an application or file, there are two ways to do this. You can create a program using a simple text editor like WordPad, or Notepad++. You can also create a program using a Python shell. There are advantages and disadvantages to each method, which we'll discuss ...

Python History

Image
Python History and Versions Python laid its foundation in the late 1980s. The implementation of Python was started in the December 1989 by Guido Van Rossum at CWI in Netherland. In February 1991, van Rossum published the code (labeled version 0.9.0) to alt.sources. In 1994, Python 1.0 was released with new features like: lambda, map, filter, and reduce. Python 2.0 added new features like: list comprehensions, garbage collection system. On December 3, 2008, Python 3.0 (also called "Py3K") was released. It was designed to rectify fundamental flaw of the language. ABC programming language is said to be the predecessor of Python language which was capable of Exception Handling and interfacing with Amoeba Operating System. Python is influenced by following programming languages: ABC language. Modula-3 Python Version List Python programming language is being updated regularly with new features and supports. There are lots of updations in python ...