23 lines
321 B
Python
Executable File
23 lines
321 B
Python
Executable File
|
|
|
|
def ist_enthalten(n, z):
|
|
|
|
i = 0
|
|
|
|
while i < len(z):
|
|
|
|
m = z[i]
|
|
|
|
if m == n:
|
|
return True
|
|
else:
|
|
i += 1
|
|
|
|
return False
|
|
|
|
|
|
|
|
z = [1,2,3,5,8,13,21,34]
|
|
print(ist_enthalten(7, z))
|
|
print(ist_enthalten(5, z))
|
|
print(ist_enthalten(60, z)) |