Giter Site home page Giter Site logo

python's Introduction

Python

Python is Open source, Interpreted, object oriented, high level language

Influenced bu ABC and basic language.

an interpreted language is a type of programming language where the source code is not compiled into machine code before the program is run. Instead, the source code is directly executed by an interpreter, which is a program that reads and executes the code line by line.

The interpreter translates each line of code into machine language, or another form of executable code, and then immediately executes it. This process continues until the end of the program is reached or an error occurs.

Interpreted languages are often used for scripting and prototyping, as they typically have a shorter development cycle than compiled languages. They are also often more flexible, as changes to the code can be made and tested more quickly. Some examples of interpreted languages include Python, Ruby, JavaScript, and PHP.

Features of Python

  1. Easy to use
  2. Expressive
  3. Interpreted (Line by line code compilation)
  4. Platform Independent
  5. Free & open source
  6. Robust (Python is considered a robust language due to its strong emphasis on code readability, simplicity, and ease of use. ) Easy to learn and use: Python's syntax is straightforward and easy to read, making it a popular choice for beginners and experts alike.

Large standard library: Python comes with a vast collection of pre-built modules and libraries that make it easy to perform a wide range of tasks.

Dynamic typing: Python is dynamically typed, which means that variables are not required to be declared with a specific data type. This makes it more flexible and allows for faster development.

Automatic memory management: Python uses garbage collection to automatically manage memory, freeing developers from having to worry about manual memory management.

Cross-platform compatibility: Python can run on multiple platforms, including Windows, Linux, and macOS, which makes it highly portable and adaptable to different environments.

Active community support: Python has a large and active community of developers who contribute to its development, ensuring that bugs are quickly fixed and the language stays up to date with the latest technology trends.

These features, among others, contribute to Python's reputation as a robust and reliable language.

  1. Rich library support

Python Character set

A valid set of char that lang can recognize

  1. Letters A-Z,a,z
  2. Digits 0-9
  3. Special symbols
  4. Whitespaces

Tokens

Smallest indiividual unit in program is a token / lexical unit

Python has following tokens

  1. Keywords => (Are the words that convey a special meaning to compiler/interpreter)

  2. Identifiers => (Name given to variables,Functions,lists,dictionaries,classes,objects)

  3. Literals =ฬ€> (Data iterms that have fixed value String,Numeric,Boolean,None(Special Literal))

  4. Operators => (Trigger some computation)

  5. Punctuators => (Punctuators are symbols used in programing language to organize sentence structures)

comments

  1. Single line #

  2. Multi line => ''' '''

Variables

  1. A variable in python represents names location

  2. variables are not storage containers in Python

  3. Dataspace memory has literal at defines mem loc and each mem loc has mem address

Dynamic typing

  1. tells us datatype of variable type(varable name)
  2. Variable pointing to value of certain tyope, can be made to point a value / obj of different type.

Multiple Assignments

a=b=c=10

x,y,z=10,20,30

Input & Output

  1. input() => to get unput from user

  2. return type of input is string

  3. we can use int(), float() with input. to convert values from input to int and float.

  4. Print() gives output

  5. print automatically converts output to strings

  6. inserts space between items automatically

sep

  1. seperates output with provided keyword
  2. print("hello","world",sep=',') hello,world

end

  1. print("hello",end=',')
  2. print("world")
  3. print appends newlie char unless end is specified

python's People

Contributors

therealdj97 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.