Total Pageviews

Monday 1 June 2015

BASICS OF PYTHON SCRITPTING

 PYTHON SCRIPTING:



 PYTHON IS VERY EASY BUT WE NEED TO UNDERSTAND THE LOGIC AND JUST IMPLEMENT IT.

WRITE A SAMPLE PROGRAM TO PRINT HELLO WORLD USING PRINT AND ECHO STATEMENT.
(COMMENT:-PRINT AND ECHO STATEMENTS ARE JUST LIKE PRINTF IN C,COUT<< IN C++.)

print "HELLO WORLD";
echo "WELCOME TO PYTHON SCRIPTING";


OUTPUT:-python   hello.py


HELLO WORLD
WELCOME TO PYTHON SCRIPTING



PRINT AND ECHO ARE USED FOR THE SAME PURPOSE(I.E., PRINT SOME THING ON SCREEN LIKE SOME SOME MEASSAGE,VARIABLES.)




Line indendations are special feature of python,

suppose 
if  condition {
some statements;
}
These is the syntax in another programming languages.

But in case mof python there will be no  flower braces ....

so the  scope is determined by line indendations


if a>b
<-tab space->print("a is greater");

Thus scope in python is determined by line which represent bygiving tab space.



*WRITE A  PYTHON SCRIPT TO PRINT BIGGEST OF THREE NUMBERS.

COMMENT:
IN THIS SCRIPT  "raw_input" IS GIVEN TO ASSIGN "enter x:" TO THE VARIABLE X

THIS IS SIMILAR TO Y AND Z ALSO IN PYTHON ELSEIF IS USED BUT IN AN DIFFERENT FORMAT LIKE elif



x = float(raw_input("Enter first number: "));
y = float(raw_input("Enter second number: "));
z = float(raw_input("Enter third number: "));

if (x > y) and (x > z):
   print"x is largest";
elif (y > x) and (y > z):
    print "y is largest";
else:
    print "z is largest";



OUTPUT:python bigger.py
           
       enter x:9
       enter y:8
       enter z:7
       x is biggest

       enter x:7
       enter y:9
       enter z:8
       y is biggest.

       enter x:7
       enter y:8
       enter z:9
       z is biggest



BUt in python 3.1  version and higher versions
raw_input gives an error that name raw _ input is not defined.

Then follow these syntax:

raw_input = vars(__builtins__).get('raw_input',input);




EXAMPLE PROGRAM TO PERFORM GREATEST AMONG TWO NUMBER WITH VARIABLE RAW_INPUT DEFINED.


raw_input = vars(__builtins__).get('raw_input',input);
a=input(raw_input("enter a"));
b=input(raw_input("enter b"));
c=input(raw_input("enter c"));
if a>b and a>c:
 print("a is greater");

elif b>c:
 print("b is greater");

else:
 print("c is greater");

OUTPUT:


*WRITE A PYTHON SCRIPT TO PRINT MULTIPLICATION OF TWO NUMBERS.


x = int(raw_input("Enter first number: "));

y = int(raw_input("Enter second number: "));
c=x*y;
print("multiplication of two numbers is:"c);


OUTPUT: python mul.py
Enter first number:3
Enter second number:5
multiplication of two numbers is:15



*program regarding multipliaction of two numbers  in python 3.1.

raw_input = vars(__builtins__).get('raw_input',input);
a=int(raw_input("enter a"));
b=int(raw_input("enter b"));

c=a*b;
print("mul of two numbers:",c);


save it as: d.py

open->cmd->browse to python then from there to your folder.

c:\python\sample>python d.py

output:


To take input of type int use the  following syntax:

raw_input=vars(__builtins__).get('raw_input',input);

variable name=int(raw_input("enter some value:"));


similarly for float:

variable name=float(raw_input("enter some value:"));


*WRITE A PYTHON SCRIPT TO PRINT DIVISION OF TWO NUMBERS WITH ITS QUOTIENT AND REMAINDER.


x = int(raw_input("Enter first number: "));

y = int(raw_input("Enter second number: "));
c=x/y;
d=x%y;
print("division of two numbers quotient is:",c);
print("division of two numbers remainder is:",d);

OUTPUT: python div.py
Enter first number:15
Enter second number:5
division of two numbers quotient is:3
division of two numbers remainder is: 0





program to perform division of two numbers in python 3.1




raw_input=vars(__builtins__).get('raw_input',input)
a=int(raw_input("enter a"))
b=int(raw_input("enter b"))

c=a%b
print("mul of two numbers:",c)

output:



In these pyhton programming the (;)semi colon(i.e., delimiter is not so important)

The main thing in python is line indendation...So careful with indendations
if    :
  print
elif    :
 print
else:
 print

Wednesday 27 May 2015

PYTHON PROGRAMMING LANGUAGE FEATURES

PYTHON PROGRAMMING:



PYTHON SCRIPTING LANGUAGE

 FEATURES:

Python is a loosely typed lanaguage..

Python does not follow any particular syntax.

unlike normal programming langauages like c,c++,java here we donot use the flower braces{},rectangular brackets [],parenthesis ( ).





Block of code

 {
----------------

}

unlike these in PytHon langUAge block is indended by lines.


BLOCK IS NOTHING BUT GROUP OF STATEMENTS.

A LANGUAGE WHICH SUPPORTS BLOCK WITH BLOCK IS CALLED BLOCK STRUCTURED LANGUAGE.


PYTHON USES DIFFERENT PRINCIPLE (I.E., LINE INDENDATION).


SPACES AND INDENDATION:
eX:
PRINT("HELLO") IS ONE BLOCK

IF WRITE STATEMENT AS 
       PRINT("HELLO")
           PRINT("HAI") ..IT WILL GENERATE ERROR ERROR FOR PRINT(''HAI") AS MORE SPACE IS PROVIDED.




Python has  conditional statements like true and false..If true execute these code or else execute these code. 

                               python scritping language also have the looping statements.







     video REGARDING PYTHON PROGRAMMING FEATURES:


                        VIDEO REGARDING FEATURES OF PYTON PROGRAMMING


POPULAR PROGRAMMING LANGUAGE PYTHON

PYTHON :

Python is a high level programming language.Phyton advantage is realibilty(i.e.,phyton code produces reliable results).


Phyton express code in fewer lines but more effective...


Phyton  provides code simplicity.

              
          mOST of the programmers chooses  python  programming.

 


The code that perform some operation with cpp,java can also be implemented by Phyton.



INTRODUCTION TO PYTHON PROGRAMMING:

PYTHON SCRIPT 








Procedure to write and save python script:


                       AFTER U WRITE PYTOHN SCRIPT SAVE IT WITH DOT (.PY)                                                   EXTENSION.

                 

                                           Example: example1.py



 POPULAR LANGUAGE PHYTON:

                             
                           VIDEO REGARDING HOW TO WRITE PYTHON SCRIPT

















INTRODUCTION TO SCRIPTING...CLIENT SIDE AND SERVER SIDE SCRITPING

    WeB TeChNoLoGy:


>>SCRIPTING LANGUAGES<<





MAJOR DIFFERENECE BETWEEN CLIENT SIDE LANGUAGES AND SERVER SIDE LANGUAGES.




WEB BROWSER OVER THE INTERNET TRANSMITTS THE USER REQUESTS TO   WEB SERVER:

INTERACTION OF WEB BROWSER WITH WEB SERVER



INTRODUCTION TO SCRIPTING  LANGUAGES:

||

.CLIENT SIDE SCRIPTING  LANGUAGES:
VBSCRIPT(VISUAL BASIC SCRIPT),JAVASCRIPT,CSS(CASCADING STYLE SHEETS),JQUERY.


.SERVER SIDE SCRIPTING LANGUAGES:


PHP(PRE PROCESSOR HYPER TEXT),
SERVLETS,
JSP(JAVA SERVER PAGES).





CLIENT SIDE SCRIPTS ARE EXECUTED AT CLIENT ITSELF WHERE AS SEREVER SCRIPTS ARE EXECUTED AT WEB SERVER .





"CLIENT SIDE SCRIPTS ARE EXECUTED FASTER COMPARED TO SERVER SIDE"











PROCESSING OF CLIENT REQUEST AT SERVER







CLIENT-SERVER   ARCHITECTURE(REQUEST AND RESPONSE) 



.REQUETS ARE SEND FROM CLIENT TO THE SERVER IN  THE FORM HTML PAGES AND SERVER PROCESS IT AND RETURNS RESPONSE IN THE FORM HTML PAGE TO CLIENT..

SO HTML PAGES HAVE GOT THE MAJOR IMPORTANCE...








SERVER SIDE SCRIPTING LANGUAGE LIKE PHP 

APACHE  SERVER  TAKING REQUESTS FROM CLIENTS  INTERACTING WITH DATABASE.




SERVER INTERACTION TO THE DB(DATABASE)






POPULAR DATABASES:




SYSBASE,

ORACLE,

MYSQL,

MICROSOFT SQL SERVER,

DB2,

SQL LITE,

MS ACCESS,

MANGO DB,

CASSANDERA,

REDIS,

TERA DATA.








client side scripting and server side scriptinG




CLIENT SIDE SCRIPTING:

VIDEO REGARDING CLIENT SIDE SCRIPTING








SERVER SIDE SCRIPTING














Monday 25 May 2015

VOIP PROTOCOL SIGINIFICANCE

VOIP(VOICE OVER INTERNET 

PROTOCOL)



One of the widely used protocol is voip on the internet.

                
     VOIP:




Voip  stands for voice over Internet protocol.

VOIP  IS ADVANCED NEW TECHNOLOGY.



VoIP basically means voice transmitted over a digital network. 


The Internet, however, isn't strictly necessary for VoIP. 

What is necessary for VoIP technology is the use of the same protocols that the Internet uses. 
(A protocol is a set of rules used to allow orderly communication.)




 *Thus, voice over Internet protocol means voice that travels by way of the same protocols used on the Internet.


*VoIP is often referred to as IP telephony (IPT) because it uses Internet protocols to make possible enhanced voice communications. 

*The Internet protocols are the basis of IP networking, which supports corporate, private, public, cable, and even wireless networks. 

*VoIP unites an organization's many locations — including mobile workers — into a single converged communications network and provides an unparalleled range of telephony support services and features .






VOIP:









                          video regarding voip basics and how they actually used.





Voice-OVer-IP(VOIP)  implementation allows to enable users to carry  voice traffic(ex:telephone calls and faxes) over  an ip network.

VOIP is mainley used as it provides:
>less cost phone calls.>Addon services and unified messsaging.>Merging of data/voice infrastructures.  






Following are some of the voip  protocols:

*Megaco           H.248 gateway control protocol.

*MGCP            Media Gateway Control Protocol.

*MIME             Multi Purpose Internet Mail Extension.

*Rv over IP       Remote Voice protocol Over IP Specification.

*SAP v2            Session Announcement Control.

*SDP                 Session Description Control.


*SGCP             Simple Gateway Control Protocol.                

*SIP                 Session Installation protocol.


*SKINNY        Skinny Client Control Protcol(SCCP).

VOIP  uses Vlan network.





VOIP SETUP:


  IS DONE BY VLAN.


Setting up VOIP connection:

VOIP TELE PHONE-> 

SWITCH-> 

 

SWITCH->


VOIP PHONE.

  voip phones works on ip and when dailed from voip the corresponding informaton is passed from one switch to the other and then received by other voip phone. 

Monday 26 January 2015

PROCESSORS


HISTORY OF MICRO PROCESSORS 


  Micro Processor can also be denoted by (new symbol)



The word micro means small and process means processing(i.e.,Performing some computation).

Micro processor is able to perform larger and complex tasks in less amount of time....

                       Evolution of Micro Processors:

  IN THE YEAR  1823              
   Baron Jons jacob Berzelius silicon(si),

    which today the basic component of computer

  IN THE  YEAR           

  1903

  Nikola Tesla patents electrical logic circuits called "gates" or  "switches".


IN THE YEAR          1947                                                                                                               John Bardeen, Walter Brattain, and William     Shockley invent the        first transistor at the Bell   Laboratories on December 23, 1947.  


IN THE      
YEAR                    1948

John Bardeen, Walter Brattain, and William Shockley patent the first transistor.


IN THE YEAR  
   1956


  John Bardeen, Walter Brattain, and William Shockley are                awarded the Nobel Prize in physics for their work            on the transistor.










IN THE YEAR         1958

The first integrated circuit is first developed by Robert     Noyce of    Fair    child Semiconductor and Jack KILBY of  Texas Instruments.  The first I C(INTEGRATED    CIRCUIT..) was demonstrated on   September 12, 1958.


IN THE YEAR    1960

IBM develops the first automatic mass-production facility for     transistors in New York.



IN THE YEAR     1968

Intel Corporation is founded by Robert Noyce and Gordon Moore.


IN THE YEAR         1969

 Advanced Micro Devices (AMD) is founded on May 1,     1969.


IN THE YEAR      1971

Intel with the help of Ted Hoff introduces the first microprocessor, the Intel 4004 on November 15, 1971. The 4004 had 2,300 transistors, performed 60,000 operations per second (OPS), addressed 640 bytes of memory, and cost $200.00.


IN THE YEAR        1972

Intel introduces the 8008 processor on April 1, 1972.


IN THE YEAR       1974

Intel's improved microprocessor chip is introduced April 1, 1974, the 8080 becomes a standard in the computer industry.


IN THE YEAR      1976

Intel introduces the 8085 processor on March 1976.


IN THE YEAR       1976

The Intel 8086 is introduced June 8, 1976.


IN THE YEAR      1979

The Intel 8088 is released on June 1, 1979.


IN THE YEAR      1979

The Motorola 68000, a 16/32-bit processor is released and is later chosen as the processor for the Apple Macintosh and Amiga computers.


IN THE YEAR      1982

The Intel 80286 is introduced February 1, 1982.


IN THE YEAR      1985

Intel introduces the first 80386 in October 1985.


IN THE YEAR      1987

  The SPARC (Scalable Processor Architecture)  processor is first introduced by Sun.


IN THE YEAR     1988

Intel 80386SX is introduced.


IN THE YEAR     1991

    AMD(ADVANCED MICRO DEVICES ) introduces the                AM386 microprocessor family in March.


IN THE YEAR     1991

Intel introduces the Intel 486SX chip in April in efforts to help bring a lower-cost processor to the PC market selling for $258.00.


IN THE YEAR      1992

Intel releases the 486DX2 chip March 2 with a clock doubling ability that generates higher operating speeds.


IN THE YEAR     1993

Intel releases the Pentium Processor on March 22 1993. The processor is a 60 MHz processor, incorporates 3.1 million transistors and sells for $878.00.




IN THE YEAR     1994

Intel releases the second generation of Intel Pentium processors on March 7, 1994.


IN THE YEAR      1995

Intel introduces the Intel Pentium Pro in November.



IN THE YEAR                                 1996

Intel announces the availability of the Pentium 150 MHz with 60MHz bus and 166 MHz with 66 MHz bus on January 4th.



IN THE YEAR     1997

Intel Pentium II is introduced on May 7, 1997.



IN THE YEAR    1999

Intel releases the Celeron 366 MHz and 400 MHz 
processors on January 4th.



IN THE YEAR                                   1999

The Intel Pentium III 500 MHz is released on February 26, 1999.

     

INTEL AND AMD ATHELON MICRO PROCESSORS:

                 
                                                                                                                       

                                                                               
IN THE  YEAR                   1999                                                             

The Intel Pentium III 550 MHz is  released on May 17, 1999.


IN THE YEAR   1999                                                                            

The Intel Pentium III 600 MHz is released on August 2, 1999.                   

IN THE YEAR           1999

The Intel Pentium III 533B and 600B MHz is released on September 27, 1999.




IN THE YEAR            1999

The Intel Pentium III Copper mine series is first introduced on October 25, 1999.


IN THE YEAR             2000

On January 5 AMD releases the 800 MHz Athlon processor.


IN THE YEAR               2000

Intel releases the Celeron 533 MHz with a 66 MHz bus processor on January 4th.


IN THE YEAR            2000

Intel announces on August 28th that it will recall its 1.3 GHz Pentium III processors due to a glitch. Users with these processors should contact their vendors for additional information about the recall.


IN THE YEAR                 2001

 On January 3 Intel releases the 800 MHz  Celeron  processor with a 100 MHz bus.


IN THE YEAR               2001

On January 3 Intel releases the 1.3 GHz Pentium 4 processor.


IN THE YEAR              2001


On October 9, 2001 AMD announces a new branding scheme. Instead of identifying processors by their clock speed the A M D  XP will bear monikers of 1800+, 1700+, 1600+, and 1500+, with each lower model 

Number representing a lower clock speed.


IN THE YEAR                  2002

Intel releases the Celeron 1.3 GHz with a 100 MHz bus and 256 kB of level 2 cache.


IN THE YEAR                      2003

Intel Pentium M is introduced in March.


IN THE YEAR  2006:

Intel releases the Core2 Duo Processor E6320 (4M        Cache, 1.86 GHz, 1066 MHz FSB) April 22, 2006.



IN THE YEAR   2006  Intel introduces the Intel   Core 2 Duo processors    with the Core2 Duo Processor E6300 (2M Cache, 1.86    GHz, 1066 MHz FSB) July 27, 2006.

IN THE YEAR  
2007  

Intel releases the Core2 Duo  Processor E4300 (2M             Cache, 1.80 GHz, 800MHz FSB) January 21,                                      2007.

IN THE YEAR   2007

Intel releases the Core2 Duo Processor E4400 (2M Cache, 2.00 GHz, 800 MHz FSB) April 22, 2007.

IN THE YEAR   2007 

Intel releases the Core2 Duo Processor E4500 (2M Cache, 2.20 GHz, 800 MHz FSB) July 22, 2007.

Evolution of processors has made possibility  of high end performance achivement.

They even lead to great development of pcs,laptops,tablets....

They multiprocessing possible...With multiple processor built on one the other...
ex:Dual core,Quad core.....
Processors speed is measured in terms of Gigahertz.

processor working mechanism is baes on the cores of the processor.....

Hirerachy of processor:



IN THE YEAR     ---2008

Intel releases the Core 2 Duo E7200 (3M Cache, 2.53 GHz, 1066 MHz FSB) on April 20, 2008.



IN THE YEAR     --
2008
Intel releases the Core2 Duo Processor E7400 (3M Cache, 2.80 GHz, 1066 MHz FSB) October 19, 2008.


IN THE YEAR      -- 2009Intel releases the Core2 Duo Processor E7500 (3M Cache, 2.93 GHz, 1066 MHz FSB) January 18, 2009




IN THE   YEAR --   2009Intel releases the Core2 Duo Processor E7600 (3M Cache, 3.06 GHz, 1066 MHz FSB) May 31, 2009