Börjat lägga till kodexempel
This commit is contained in:
5
kapitel3/if-ex1.py
Normal file
5
kapitel3/if-ex1.py
Normal file
@@ -0,0 +1,5 @@
|
||||
if 1 < 3:
|
||||
print ("1 är mindre än 3")
|
||||
else:
|
||||
print ("1 är inte mindre än 3")
|
||||
|
6
kapitel3/rita-kvadrat.py
Normal file
6
kapitel3/rita-kvadrat.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import turtle
|
||||
for x in range(0,4):
|
||||
turtle.forward(100)
|
||||
turtle.left(90)
|
||||
turtle.done()
|
||||
|
5
kapitel3/variabler-ex1.py
Normal file
5
kapitel3/variabler-ex1.py
Normal file
@@ -0,0 +1,5 @@
|
||||
tal1 = input("Tal nummer ett? ")
|
||||
tal2 = input("Tal nummer två? ")
|
||||
svar = (int(tal1) + int(tal2))
|
||||
print (svar)
|
||||
|
Reference in New Issue
Block a user