>>> ================================ RESTART ================================
>>> sprache = "Python"
>>> attribut = "is great!"
>>> sprache + attribut
'Pythonis great!'
>>> sprache + " " + attribut
'Python is great!'
>>> 3+6
9
>>> a="3"
>>> b="4"
>>> a+b
'34'
>>> ================================ RESTART ================================
>>>
7 is odd
88 is even
26 is even
25 is odd
35 is odd
66 is even
47 is odd
10 is even
92 is even
16 is even
Found 6 even and 4 odd numbers
>>> ================================ RESTART ================================
>>>
72 is even
66 is even
65 is odd
81 is odd
94 is even
15 is odd
69 is odd
25 is odd
5 is odd
15 is odd
Found 3 even and 7 odd numbers
>>> ================================ RESTART ================================
>>>
77 is odd
96 is even
23 is odd
56 is even
67 is odd
95 is odd
8 is even
17 is odd
60 is even
21 is odd
Found 4 even and 6 odd numbers
>>> ================================ RESTART ================================
>>> if 7%3==1:
print("hello")
hello
>>> 24 is even
False
>>> if 7%3==1:
print("hello")
SyntaxError: expected an indented block
>>> 5+7
12
>>> a=5
>>> a+3
8
>>> 6/2
3.0
>>> from __future__ import division
>>> type(5)
>>> type(5/2)
>>> type("4")
>>> type(False)
>>> type(3==4)
>>> a= "wer"
>>> b=4
>>> type(a)
>>> type(b)
>>> type(t)
Traceback (most recent call last):
File "", line 1, in
type(t)
NameError: name 't' is not defined
>>> 4==3=
SyntaxError: invalid syntax
>>> 3%$4
SyntaxError: invalid syntax
>>> a="wieso"
>>> b=5
>>> c="weil"
>>> d=7
>>> e=3.7
>>> a+b
Traceback (most recent call last):
File "", line 1, in
a+b
TypeError: Can't convert 'int' object to str implicitly
>>> b+a
Traceback (most recent call last):
File "", line 1, in
b+a
TypeError: unsupported operand type(s) for +: 'int' and 'str'
>>> a+c
'wiesoweil'
>>> b+d
12
>>> type(b+d)
>>> type(b+e)
>>> b+e
8.7
>>> f= b+3+0.3
>>> f= b+d+0.3
>>> f= b+e+0.3
>>> f
9.0
>>> type(f)
>>> type(9)
>>> a="wieso"
>>> b=5
>>> d=7
>>> 7/5
1.4
>>> 7//5
1
>>> a=13
>>> b=277
>>> a=12142424
>>> (a//b) + a%b
43964
>>> a=13
>>> b=4
>>> a//b
3
>>> a%b
1
>>> (a//b)*b + a%b
13
>>> a=12142424
>>> b=277
>>> (a//b)*b + a%b
12142424
>>>