Python Introduction :-
Example :-
Code:-
>>>print "Hello form Amritansh Computers"
Output:-
Hello from Amritansh Computers
Variables and Types :-
We use variables to capture data in programming language that can be manipulated to provide information. everything is objects and they have three characteristics i.e.
An Identity - means its name or you can say the address in memory.
A type - means the type of value that is stored in that particular location.
A Value- any number or letter or string i.e. stored on that identity location.
Keywords :-
Keywords are the reserve word in programming language that have a special meaning used to recognize the structure of program, so you can not use that keyword as an identifier in your program.
some python keywords are -
and , del, from, not, while, as , elif, global, or, with, assert, else, if, pass, yield, break, except import, print, class, exec, in , raise, continue, finally, is return, def, for, lambda, try.
Operators and operands.
operators are used for computation like addition, subtraction, multiplication, division and the values on which operators are applied is known as operands. there are some kind of operators that are Arithmetic, Relational, Logical and Assignment operator.
Arithmetic operators - +, -, *, /, %, **, and //.
Relational operators: <, <=, >, >=, != or <> and ==.
Logical operators: and, or, not
Assignment Operator: =, +=, -=, *=, /=, %=, **= and //=
>
No comments:
Post a Comment