#Fuer das naechste Architektur Modell brauchen die neuen Architektur Studenten Depron. #Mit dieser Phyton-Datei kann man ausrechnen wie viele und welche Platten man braucht # und wie hoch die Kosten sind. #Platte klein (250 x 500) = pk, kostet 1,50 Eur #Platte gross (500 x 1000) = pg, kostet 4,40 Eur #Gesamtkosten = k f1 = 25*50 f2 = 50*100 k = 0 pk=0 pg=0 print "Hallo wie viel Flaeche Material brauchen Sie?" x = input("in cm^2 eingeben") print"ich brauche", x, "cm^2 an Material" #print"ich brauche", x, "cm^2" while x-f2 >= 0: x = x-f2 k = k+4.40 pg = pg+1 while x-f1 >= 0: x = x-f1 k = k+1.50 pk = pk+1 if x is not 0 and x-f1<=0: x = x-f1 k = k+1.50 pk = pk+1 if pk == 4: pk = pk-4 pg = pg+1 k = k-6+4.40 x = abs(x) print "Sie brauchen", pk, "kleine Platten und", pg,"grosse Platten" print "Sie haben", x,"cm^2 an Material im Ueberschuss" print "Gesamtkosten", k, "Eur"