diff --git a/Les 3/3-1.py b/Les 3/3-1.py new file mode 100644 index 0000000..e69de29 diff --git a/Les 3/3-2.py b/Les 3/3-2.py new file mode 100644 index 0000000..afbf21c --- /dev/null +++ b/Les 3/3-2.py @@ -0,0 +1,3 @@ +print(0==(1==2)) +print(2+(3==4)+5==7) +print((1<-1)==(3>4)) diff --git a/Les 3/3-3.py b/Les 3/3-3.py new file mode 100644 index 0000000..f2d016c --- /dev/null +++ b/Les 3/3-3.py @@ -0,0 +1,3 @@ +uurloon = int(input("Wat is je uurloon?")) +uren = int(input("Hoeveel uur heb je gewerkt?")) +print("Je salaris is", uurloon*uren, "Euro") \ No newline at end of file diff --git a/Les 3/test.py b/Les 3/test.py new file mode 100644 index 0000000..e69de29 diff --git a/les 4/4-1.py b/les 4/4-1.py new file mode 100644 index 0000000..fb2992a --- /dev/null +++ b/les 4/4-1.py @@ -0,0 +1,3 @@ +score = int(input("Wat is je score: ")) +if score >= 15: + print("Je bent geslaagd") \ No newline at end of file diff --git a/les 4/4-2.py b/les 4/4-2.py new file mode 100644 index 0000000..6e4add2 --- /dev/null +++ b/les 4/4-2.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 +#title :4-2.py +#description :Opdracht 4.2 - If with 2 boolean operators +#author :Marcel Haazen +#email :marcel@haazen.xyz +#date :21-09-2019 - 23:20 +#version :0.1 +#usage :python3 4-2.py +#notes : +#python_version :3.7.4 +#============================================================================== +age = input("Wat is je leeftijd: ") +pasport = input("Heb je een Nederlandse paspoort: ") + +if age >= 18 and pasport == "ja": + print("Je mag stemmen") \ No newline at end of file diff --git a/les 4/4-3.py b/les 4/4-3.py new file mode 100644 index 0000000..4931277 --- /dev/null +++ b/les 4/4-3.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 +#title :4-3.py +#description :Opdracht 4.3 - If/else +#author :Marcel Haazen +#email :marcel@haazen.xyz +#date :21-09-2019 - 23:22 +#version :0.1 +#usage :python3 4-3.py +#notes : +#python_version :3.7.4 +#============================================================================== +age = int(input("Wat is je leeftijd: ")) +pasport = input("Heb je een Nederlandse paspoort: ") + +if age >= 18 and pasport == "ja": + print("Je mag stemmen") +else: + print("Helaas je mag niet stemmen") \ No newline at end of file diff --git a/les 4/4-4.py b/les 4/4-4.py new file mode 100644 index 0000000..d0e4b9b --- /dev/null +++ b/les 4/4-4.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 +#title :4-4.py +#description :Opdracht 4.4 - For, If & strings +#author :Marcel Haazen +#email :marcel@haazen.xyz +#date :21-09-2019 - 23:28 +#version :0.1 +#usage :python3 4-4.py +#notes : +#python_version :3.7.4 +#============================================================================== +days = ['maandag','dinsdag','woensdag'] + +for day in days: + print(day[:2]) \ No newline at end of file diff --git a/les 4/4-5.py b/les 4/4-5.py new file mode 100644 index 0000000..9d7b7f6 --- /dev/null +++ b/les 4/4-5.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 +#title :4-5.py +#description :Opdracht 4.5 - For, If & numbers +#author :Marcel Haazen +#email :marcel@haazen.xyz +#date :21-09-2019 - 23:30 +#version :0.1 +#usage :python3 4-5.py +#notes : +#python_version :3.7.4 +#============================================================================== +numbers = [1,2,3,4,5,6,7,8,9,10] + +for number in numbers: + if number % 2 == 0: + print(number) \ No newline at end of file diff --git a/les 4/4-6.py b/les 4/4-6.py new file mode 100644 index 0000000..2d1bf05 --- /dev/null +++ b/les 4/4-6.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 +#title :4-6.py +#description :Opdracht 4.6 - For, If & vowels +#author :Marcel Haazen +#email :marcel@haazen.xyz +#date :21-09-2019 - 23:33 +#version :0.1 +#usage :python3 4-6.py +#notes : +#python_version :3.7.4 +#============================================================================== +s = "Guido van Rossum heeft programmeertaal Python bedacht." +vowels = "aeiou" +for letter in s: + if letter in vowels: + print(letter) \ No newline at end of file