PY-Into 1
python
Why use python?
it's is open source
it was created by Guido Van Rossum
and for more background its wiki is @ Python
python shell
From a terminal windows type "Python"
you should see >>>
type print("hello world")
MATH TIME!
5 + 4
5 - 4
a = 3
b = 4
c = a**2 + b**2
print(c)
Modulo yields a remainder from the division of the first argument by the second.
9%39%2
What are the results when you run the code in python?
blah = 1.2
- newblah = blah * 4
- Result of newblah?
- intblah = int(newblah)
- Result of intblah?
unary vs binary vs ternary vs logic
We now have logic to worry about.
blah = 5
if blah = 5:
print("ich")
if blah == 5:
print("ich")
if blah != 5:
print("ich")