shuh4u=43;#definiere meine Variablea=1;#Startwert für aforiinrange(1,shuh4u+1):# i läuft von 1 bis 43a=(i)*aprint'Die Fakultät von',shuh4u,'ist:',a# gibt das Ergebnis ausprint'Test: Sind beide Werte gleich?'# hier kommt der Testiftrue:factorial(shuh4u)==a# gibt "TRUE", wenn wahr, sonst "FALSE"
Die Fakultät von 43 ist: 60415263063373835637355132068513997507264512000000000
Test: Sind beide Werte gleich?
True
l=[]#erstelle Listeforiinsrange(-5,5,0.6):#bel. Werte für il.append(circle((2,(abs(-1*i))+1),1-1/(6),hue=i/10))#fülle Listea=animate(l,xmin=0,ymin=0,xmax=10,ymax=10,figsize=[2,2],axes=false)#überge Liste l an animate()show(a)
x_coords=[0.99*nforninsrange(0,150,1)]y_coords=[sin(2*pi*0.99*n)forninsrange(0,150,1)]#gewünschte Fktlist_plot(zip(x_coords,y_coords))#vereint x, y
a=plot(sin(2*pi*x),(x,0,150),rgbcolor='red')#gewünschte Fktx_coords=[0.99*nforninsrange(0,150,1)]y_coords=[sin(2*pi*0.99*n)forninsrange(0,150,1)]b=list_plot(zip(x_coords,y_coords))#Ergebnis von obenshow(a+b)#Plote zusammen