Punkte pro Testfall: 5; Abzug pro fehlerhaften Testfall: 0; Maximum: 25 Testfall: {-1,1-}(dreiNplusEins :: Integer -> [Integer]) 1 == [1]; Testfall OK Testfall: {-1,2-}[(n,l)|n<-[1,3,33,75,1234,32432],l<-[(length.dreiNplusEins)(2^(toInteger n))],l/=n+1] == []; Testfall OK Testfall: {-1,3-}[(length.dreiNplusEins)n|n<-[1..7]] == [1,2,8,3,6,9,17]; Testfall OK Testfall: {-1,4-}[(length.dreiNplusEins)n|n<-[8..27]] == [4,20,7,15,10,10,18,18,5,13,21,21,8,8,16,16,11,24,11,112]; Testfall OK Testfall: {-1,5-}[(length.dreiNplusEins)n|n<-[9663]] == [185]; Testfall OK Testfaelle OK: 5; Testfaelle FALSCH: 0 Punkte : 25 Punkte pro Testfall: 5; Abzug pro fehlerhaften Testfall: 0; Maximum: 25 Testfall: {-2,1-}(maxZyklus :: UntereGrenze -> ObereGrenze -> (UntereGrenze,ObereGrenze,MaxZykLaenge)) 1 27 == (1,27,112); Testfall OK Testfall: {-2,2-}[(maxZyklus 1 n)|n<-[26..28]] == [(1,26,24),(1,27,112),(1,28,112)]; Testfall OK Testfall: {-2,3-}[(m,n,rz)|m<-[1..200],n<-[1..m-1],(rm,rn,rz)<-[maxZyklus m n],rz/=0||rm/=m||rn/=n] == []; Testfall OK Testfall: {-2,4-}[(m,n,rz)|m<-[1..500],n<-[1..m-1],(rm,rn,rz)<-[maxZyklus m n],rz/=0||rm/=m||rn/=n] == []; Testfall OK Testfall: {-2,5-}maxZyklus 999999 999999 == (999999,999999,259); Testfall OK Testfaelle OK: 5; Testfaelle FALSCH: 0 Punkte : 25 Punkte pro Testfall: 5; Abzug pro fehlerhaften Testfall: 0; Maximum: 25 Testfall: {-3,1-}(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)[[True]](0,0) == 0; Testfall OK Testfall: {-3,2-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let t=True;f=False in [[t,f,f],[t,f,f],[f,t,f]])p|p<-[(0,1),(5,-2)]] == [2,-1]; Testfall OK Testfall: {-3,3-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let t=True;f=False in [[t,f,f],[t,f,f],[f,t,f]])(i,j)|i<-[0..2],j<-[0..2]] ; Testfall FALSCH Erwartet: {-3,3-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let t=True;f=False in [[t,f,f],[t,f,f],[f,t,f]])(i,j)|i<-[0..2],j<-[0..2]] == [1,2,2,2,3,1,0,1,1] Ausgabe: {-3,3-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let t=True;f=False in [[t,f,f],[t,f,f],[f,t,f]])(i,j)|i<-[0..2],j<-[0..2]] ==[1,2,0,2,3,1,2,1,1] Testfall: {-3,3'-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let t=True;f=False in [[t,f,f],[t,f,f],[f,t,f]])(j,i)|i<-[0..2],j<-[0..2]] == [1,2,2,2,3,1,0,1,1]; Testfall OK Testfall: {-3,4-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let t=True;f=False in [[t,f,f,t],[t,t,f,f],[f,f,t,f]])(i,j)|i<-[0..3],j<-[0..2]] ; Testfall FALSCH Erwartet: {-3,4-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let t=True;f=False in [[t,f,f,t],[t,t,f,f],[f,f,t,f]])(i,j)|i<-[0..3],j<-[0..2]] == [2,2,2,3,3,3,2,3,1,0,2,1] Ausgabe: {-3,4-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let t=True;f=False in [[t,f,f,t],[t,t,f,f],[f,f,t,f]])(i,j)|i<-[0..3],j<-[0..2]] ==[2,3,2,2,3,3,2,3,1,-1,-1,-1] Testfall: {-3,4'-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let t=True;f=False in [[t,f,f,t],[t,t,f,f],[f,f,t,f]])(j,i)|i<-[0..3],j<-[0..2]] == [2,2,2,3,3,3,2,3,1,0,2,1]; Testfall OK Testfall: {-3,5-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let f=True;t=False in [[t,f,f,t],[t,t,f,f],[f,f,t,f]])(i,j)|i<-[0..3],j<-[0..2]] ; Testfall FALSCH Erwartet: {-3,5-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let f=True;t=False in [[t,f,f,t],[t,t,f,f],[f,f,t,f]])(i,j)|i<-[0..3],j<-[0..2]] == [1,3,1,2,5,2,3,5,4,3,3,2] Ausgabe: {-3,5-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let f=True;t=False in [[t,f,f,t],[t,t,f,f],[f,f,t,f]])(i,j)|i<-[0..3],j<-[0..2]] ==[1,2,3,3,5,5,1,2,4,-1,-1,-1] Testfall: {-3,5'-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let f=True;t=False in [[t,f,f,t],[t,t,f,f],[f,f,t,f]])(j,i)|i<-[0..3],j<-[0..2]] == [1,3,1,2,5,2,3,5,4,3,3,2]; Testfall OK Testfaelle OK: 5; Testfaelle FALSCH: 3 Punkte : 25 Punkte pro Testfall: 5; Abzug pro fehlerhaften Testfall: 0; Maximum: 25 Testfall: {-4,1-}(transform :: [[Bool]] -> [[Integer]]) [[True]] == [[0]]; Testfall OK Testfall: {-4,2-}(transform :: [[Bool]] -> [[Integer]]) (let t=True;f=False in [[t,f,f],[t,f,f],[f,t,f]]) == [[1,2,0],[2,3,1],[2,1,1]]; Testfall OK Testfall: {-4,3-}transform(let t=True;f=False in [[t,f,f],[t,f,f],[f,t,f]]) == [[1,2,0],[2,3,1],[2,1,1]]; Testfall OK Testfall: {-4,4-}transform(let t=True;f=False in [[t,f,f,t],[t,t,f,f],[f,f,t,f]]) == [[2,3,2,0],[2,3,3,2],[2,3,1,1]]; Testfall OK Testfall: {-4,5-}transform(let f=True;t=False in [[t,f,f,t],[t,t,f,f],[f,f,t,f]]) == [[1,2,3,3],[3,5,5,3],[1,2,4,2]]; Testfall OK Testfaelle OK: 5; Testfaelle FALSCH: 0 Punkte : 25 Punkte gesamt: 100