We are closing registration and public forum view to Paid & Private in 16 days! CLICK HERE to register FREE.
 
Create an account  

For users privacy, our last domains: CarderHack.com and OmertaHack.net are moved to CardingTeam.ws

Deposit & Withdraw | About Verified Sellers and Escrow | Advertise | Scam Report | Tracking Number Details | ICQ: 717039384

carding forums carding forums
carding forums carding forums
carding forums Paid adv expire in 48 days
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 
Chp:->2 Python <-> More Python

#1
Chapter -- > 2 :~# More python

#2.1 --|Numbers|--

Python is just like powerful language such as C and java, supports 3 data types for scientific calculations. The three DATA TYPES are :

1. Integer
2. String
3. Boolean

+================================================================+

#2.2 --|Variables|--

In python language, Variables needn't declared.
You can call them right from where you need them!

For instance
Variable can be assigned by just simply typing x = 6
But in other lanugages such as C++
You have to declare variable as follows;
Quoteint x;

Another example

>>>x = 3>>>y = 3>>>print(x*y)9
First variable x is assgined integer 3
Then variable y is assgined integer 3
After that, print function is used to output the results.
Now you should have grub the basics of variable Big Grin

+===============================================================+

2.3# --|Functions|-- (General)

Now we're going to talk about functions briefly
Functions are vital in every programming lanugages.
You can define your own function or use the existing function.
Function is sort of like a feature, for example "pow(x,y)" is a function.
Functions can help make your program more powerful and as well as making your program easier to maintain!

In C++ when writing functions (not very sure Big Grin)
1. Definiation must be first declared
2. Write the defination
3. Call the Definination
are bound to be followed.

+==================================================================+

2.4# --|Modules|-- (General)

You may have realized the import statement  above some of the programs.
Eg. import math
Import is a command that import the modules into the program.
Modules can make program more powerful.
We'll come to modules later...

+==================================================================+


2.5# --|Comments|--

If you have tried any one of programming language, you would have heard about comment definately. Every programming language has it's own style of writting comments.
For example, Comments in C language is indicated by /* comment */
In python you just need to use sharp sign "#"#!usr/bin/env python#This is a commentPrint(‘hello’)#This is a comment again

Interpreter will not execute the string/code after # sign, it knows that it's a comment, and simply skips. Commenting makes the program more readable and easier to debug.
We'll go into details about writing functions in next chapter.

Commonly used Functions
1.print()
2.input() / raw_input()
2.float
3.complex

Example, 1, 2, 3, 4 are integers.
Python do not have long integer type as C language. It's included in integer type.
This might be a weakness.

6.39 and 787.6E-9 is float data type.
787.6E-9 = 787.6*10-9

It also supports complex number that are commonly used in Mathematics.
Example 9+7j

Now we'll deal with number operatoin. #OpNo Big Grin
Open up Python shell. Let's get started.

>>> 1+12>>>1/20
Now why 1 divided by 2 didn't result in 0.5?
Because Python took it as integer. But it's not the problem anymore in python version 3.

>>>1.0/2.00.5
In this way, we can calcualte basic Arithmetic Operations, such as addition, subtruction, multiplication, and division.
“+ - / *”
Another one
>>>1%2
"%" operator is used to calculate remainder of a division.

Quote
>>>3**2
9
"**" means power

>>>-3**2
-9
>>>(-3)**2
9
Latest version didn't have the buffer overflow anymore!
Hexadecimal and Octal are also supported

Quote
>>>0xCD
205

Hex form is 0xXX
>>>010
8
This is ocatal, but in version 3 it changed to following

>>>0o10
8

Now, we've reached the end of Chapter 2 Big Grin

Thanks for reading.
Ref : Multiple Sources
MrGeek @ Z+ :-> logout
Reply
Paid adv. expire in 31 days
CLICK to buy Advertisement !

    Verified & Trusted WesternUnion / MoneyGram / Bank - Transferring -WorldWide [ MTCN in 3 hours ]




Forum Jump: