""" def sum_gange(tall1, tall2): sum = tall1 + tall2 prod = tall1 * tall2 return sum, prod summ, produkt = sum_gange(10,5) print(summ, produkt) """ """ def sjekk_storre(tall1, tall2): assert tall1 > tall2 or tall2 > tall1, "tallene er like!" if tall1 > tall2: return tall1 return tall2 assert sjekk_storre(10,15) == 15 print("Vi kom til slutten!") """ """ liste = [1,2,2,3,4,5,5,7,8,9,9] tall_med_par = [] for i in range(len(liste)-1): tall_her = liste[i] tall_ved_siden_av = liste[i+1] if tall_her == tall_ved_siden_av: tall_med_par.append(tall_her) print(tall_med_par) """ liste = [1,7,5,87,6,4,6,7,8,123,5] storst = liste[0] for tall in liste: if tall > storst: storst = tall print(storst)