Begynder done. /JL

This commit is contained in:
Jan Lerking
2025-03-17 13:05:30 +01:00
parent 250e562514
commit be2ae1cdc9
4 changed files with 22 additions and 0 deletions

6
begynder/main.py Normal file
View File

@@ -0,0 +1,6 @@
MIN_VARIABEL = "Hej med dig!"
def udskriv_variabel(var):
print(var)
udskriv_variabel(MIN_VARIABEL)

6
begynder/sum.py Normal file
View File

@@ -0,0 +1,6 @@
def sum(tal1, tal2):
return str(f"Resultat {tal1} + {tal2}: {tal1 + tal2}")
resultat = sum(5, 3)
print(resultat)

10
begynder/sum2.py Normal file
View File

@@ -0,0 +1,10 @@
def sum(tal1, tal2):
# return str(f"Resultat {tal1} + {tal2}: {tal1 + tal2}")
return str(f"Resultat {tal1} + {tal2}: {int(tal1) + int(tal2)}")
tal1 = input("Indtast tal1:")
tal2 = input("Indtast tal2:")
resultat = sum(tal1, tal2)
print(resultat)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB