def kvadrat(tall): return tall**2 def kvadratSum(tall1, tall2, tall3): return tall1*tall1+tall2*tall2+tall3*tall3 def kvadratListe(liste): nyListe = [] for x in liste: nyListe.append(x**2) return nyListe print(kvadrat(5)) print(kvadratSum(2,3,4)) print(kvadratListe([1, 2, 3 ,4 ,5 ,6])) #Oppgave 4 def nestStorstElem(liste): storst = liste[0] nestStorst = liste[0] for x in liste: if x > nestStorst: if x > storst: nestStorst = storst storst = x else: nestStorst = x return nestStorst print(nestStorstElem([0,2,4,3,5,1,0,9])) #Oppg 5 def erLike(liste1, liste2): if len(liste1) != len(liste2): return False for i in range(len(liste1)): if liste1[i] != liste2[i]: return False return True print(erLike([1,2,3,4,5,1,2,0], [1,2,3,4,5,1,2,0,1]))