In [2]:
1 + 1
Out[2]:
$$ x + y = 2 $$
$ x + y = 2 $
In [4]:
def test():
pass
In [7]:
def test_2(x):
return x**2
In [8]:
test_2(10)
Out[8]:
In [9]:
test_2(100)
Out[9]:
In [10]:
print("This line will be printed.")
In [11]:
x = 1
if x == 1:
# indented four spaces
print("x is 1.")
In [12]:
myfloat = 7.0
print(myfloat)
myfloat = float(7)
print(myfloat)
In [13]:
mystring = 'hello'
print(mystring)
mystring = "hello"
print(mystring)
In [14]:
one = 1
two = 2
three = one + two
print(three)
hello = "hello"
world = "world"
helloworld = hello + " " + world
print(helloworld)
In [ ]: