Skip to main content

Welcome To Python



Python is a programming language that lets you work more quickly and integrate your systems more effectively. Python can be easy to pick up whether you're a first time programmer or you're experienced with other languages.



This tutorial is designed to help people teach themselves Python

YOUR FIRST PROGRAM

Let's start off by creating a short program that displays "Hello world!".
In Python, we use the print statement to output text.

The print statement needs to be followed by parentheses, which enclose the output we want to generate.



Printing Text

The print statement can also be used to output multiple lines of text.

Each print statement outputs text from a new line.


Creating and Printing variable

Variables are containers for storing data values. Unlike other programming languages, Python has no command for declaring a variable.

A variable is created the moment you first assign a value to it.

A variable can have a short name (like x and y) or a more descriptive name (age, carname, total_volume). Rules for Python variables:

  • A variable name must start with a letter or the underscore character
  • A variable name cannot start with a number
  • A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ )
  • Variable names are case-sensitive (age, Age and AGE are three different variables)


Output Variables

The Python print statement is often used to output variables.

To combine both text and a variable, Python uses the + character:


Input Function

The input() function allows user input.

Comments

Popular posts from this blog

Python Data Types and Type Conversion

Built-in Data Types In programming, data type is an important concept. Variables can store data of different types, and different types can do different things. Python has the following data types built-in by default, in these categories: Text Type: str Numeric Types: int ,  float ,  complex Sequence Types: list ,  tuple ,  range Mapping Type: dict Set Types: set ,  frozenset Boolean Type: bool Binary Types: bytes ,  bytearray ,  memoryview Getting the Data Type You can get the data type of any object by using the  type()  function: Example Print the data type of the variable x: Type Conversion You can convert from one type to another with the  int() ,  float() , and  complex()  methods: Example Convert from one type to another:

Sign In and Sign Up with Python (Back-End)

Sign up to the awesomeness of this cool project and get yourself started!