In [1]:
a = 10.
a*a
Out[1]:
In [2]:
a/2.
Out[2]:
In [3]:
a**2.
Out[3]:
In [4]:
a-5.
Out[4]:
In [5]:
a+5.
Out[5]:
In [6]:
# import <name vom Modul>
import math
In [7]:
math.log(2.2342343)
Out[7]:
In [8]:
math.log10(10000.)
Out[8]:
In [9]:
math.sqrt(81)
Out[9]:
In [ ]:
math.
In [10]:
# Alternative 2 zum Import
from math import *
### so eher nicht!
In [11]:
import math as mymathlib
In [ ]:
mymathlib.
In [15]:
4.+8.
Out[15]:
In [29]:
x = {'nachname' : 'Loew', 'vorname' : 'alex', 'plz' : 80333, 'noten' : [1,2,3,4,5]}
In [33]:
x
Out[33]:
In [32]:
type(x['noten'])
Out[32]:
In [34]:
type(x)
Out[34]:
In [35]:
x.keys() # gibt Feldnameen
Out[35]:
In [36]:
type(x.keys())
Out[36]:
In [ ]: