Skip to content

shradhanjali-code/python-program

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

what is python?

python is simple,easy &portable. python is free &open source. python is high level,interpreted language. python was developed by Guidio van Rosum. python is interpreted language means when we write python code its executed the code line by line thats why we called python is interpreted language. print is a function to give output statement in python.simply we can tell "print"is output function.

character set of python language:-

latter-> A-Z,a-z digits-> 0-9 special character-> _,+,/,* etc....... Whitespaces-> Blank Spaces,Tab,New line.

What is variable ?

A variable is a name givden to a memmory location in a program else we can simply say variable is a container to store some data.

example - name="shradha" age=23 salary=23000.56

vaeiable name - name,age,salary variable value- "shradha",23,23000.56

Rules for identifiers:-

  1. identifires -names of the variable
  2. identifiers can be combination of upper case and lower case and letter,digits or an underscore(_).ex.myVariable,variable-1
  3. an identifiers can not start

NOTE- myAge-> camel case letter

'type' is a operat

Data type:-

-Mainly data type of 5 types in python. -These data types are unmutable or build-in data type.

  1. integer-+ve value,0,-ve value
  2. String-"hello","shradha" etc....
  3. Float-3.91,4.00,9.1 etc...
  4. Boolean-True,False
  5. None- not assign

Comments in python:-

when we write some code but we dont want to execute it then we give the comment line to thet place so thet line of code will not execute. cpomment are of two types-

  1. single line comment:- when we give the single line comments. in python we did it on '#' ex-

single line comment

this is a comment

  1. multi line comment - when we give the multi line comment we did it through """-""" ex:- """ multi line comments """

Types of operator:- -simply we can say operator is a symbol that performs a certion between opearand. ex:- a+b a,b-> operands

  • -> opertor -those are of 4 types of operator are present in python :-
  1. arithmetic operator -(+,-,/,*)
  2. relational operator -(==,!=,<,>,>=,<=)
  3. assignment operator-(=,+=,-=,) 4> logical operator-(and,or,not)

Input in python:- -input statement is used to accept values(use keyword) from user

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages