here we go, lets start with the definition of python. python is a programming language that lets you work more quickly and integrate your systems more effectively. then what the beneficials of using python ?
- Great documentation and community
- Very clean syntax
- Readable code
- Open source
- Portable : Windows, Linux, Mac OS
- Interactive : built-in interpreter
- Code can be grouped in modules and packages
- OOP ( Object-oriented programming
Python is used for :
- Web development
- Network applications
- Software testing
- GUI development
- Scientific applications
oke lest make a good environtment, in this case i used kali linux for testing my python script if u have some another option linux distro u can use that, go open virtualbox or u can download in the official page. oke after that we are going to setting the virtual box.
go to file -> preferences -> network -> host only networks -> click twice
right click in your virtual machine -> settings -> System -> Processor
Network -> Adapter 2 -> ok
oke we are done, oke lets open your virtual machines and check your configuration !
if u used the debian distro u can use this command
and u will see your configuration adapters. now we are going to learning the basic of python first use your python command in terminal and u will see the console. in this section we must import the modules first, oke what the definition of modules in python ?
A module is a file containing Python definitions and statements.
1. Knowing a dir and help command, for example:
#help(sys) *showing a detail the sys modules
#dir(sys) *containing a sys statements that can be used
2. Make a script & execute it
print raw_input(“Please fill what you want : “) *then exit ctrl+x -> y -> enter
3. Understanding a boolean operators
as u can see, i already give u a diagram of boolean operators, there are 3 boolean
AND, OR, NOT. oke lets try these all boolean
(1==1) and (2==2) true
(1==2) and (2==3) false
(1==1) or (2==2) true
(1==2) or (2==2) true
(1==3) or (2==1) false
4. Conversions between data types