This commit is contained in:
2022-11-22 14:45:34 +01:00
parent 8657075f55
commit 2a1f5ea7c6
5 changed files with 115 additions and 1 deletions

27
Dienstag/zahlen.py Normal file
View File

@@ -0,0 +1,27 @@
#! /usr/bin/env python3
list_zahlen = []
for zahl in range(0, 11, 2):
list_zahlen.append(zahl)
else:
print(list_zahlen)
#oder
myzahl = range(0,11,2)
mylist = [i for i in myzahl]
print(mylist)
#oder
neue_list = []
mylist2 = list(range(1, 11, 2))
#Aufgabe
for a in mylist2:
neue_list.append(a * a * a)
else:
print(neue_list)
#oder
print([d**3 for d in mylist2])
# ID gibt den Speicherbereich aus
# is für die exakte gleichheit nur bei den Werten reicht ==