step to use if statement:
x = int(input("Enter your integer number: "))
if x < 0:
print ("It is negative")
else:
print ("It is non-negative")
SAVE AND RUN.
REMEMBER: If and Else should be at the same "indentation level".
it will give error if you write:
if blah blah
else blah blah
if statement in python 3.
Posted by
SmoothWayToWorldofPsycho
on Saturday, February 26, 2011
Labels:
programming,
python
0
comments
Python as calculator
Posted by
SmoothWayToWorldofPsycho
Labels:
programming,
python
0
comments
You can use python as a calculator. For example:
width=7;
height=2;
area = width * height;
print = (area);
It shows 14.
width=7;
height=2;
area = width * height;
print = (area);
It shows 14.
Hello World in python 3.
Posted by
SmoothWayToWorldofPsycho
Labels:
programming,
python
0
comments
- Printing 'hello world':
print ("Hello World!")
- write the following text in a text editor whatever you like
print ("Hello World!")
- then, save and run.
It prints "Hello World"
Let's learn Python 3 together!
Posted by
SmoothWayToWorldofPsycho
Labels:
programming,
python
0
comments
It is now one of the most popular programming language. Absolutely it's free to use. It runs on Windows, Mac Os X, Linux/Unix. If want to know more (Click here)
Download it from here. Then installed it by steps in there.
High customizable linux distribution
Posted by
SmoothWayToWorldofPsycho
on Friday, February 25, 2011
Labels:
arch linux,
linux
0
comments
in few days ago, I've installed Arch Linux. So i enjoyed it so much, because it provided me to customize some settings. Also it works super fast. It was quite easy to install but configuring pppoe configuration.
here is screenshot:
here is screenshot: