Browse Source

Added last made assignments

master
Marcel Haazen 4 years ago
parent
commit
0dfd302441
10 changed files with 90 additions and 0 deletions
  1. +0
    -0
      Les 3/3-1.py
  2. +3
    -0
      Les 3/3-2.py
  3. +3
    -0
      Les 3/3-3.py
  4. +0
    -0
      Les 3/test.py
  5. +3
    -0
      les 4/4-1.py
  6. +16
    -0
      les 4/4-2.py
  7. +18
    -0
      les 4/4-3.py
  8. +15
    -0
      les 4/4-4.py
  9. +16
    -0
      les 4/4-5.py
  10. +16
    -0
      les 4/4-6.py

+ 0
- 0
Les 3/3-1.py View File


+ 3
- 0
Les 3/3-2.py View File

@ -0,0 +1,3 @@
print(0==(1==2))
print(2+(3==4)+5==7)
print((1<-1)==(3>4))

+ 3
- 0
Les 3/3-3.py View File

@ -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")

+ 0
- 0
Les 3/test.py View File


+ 3
- 0
les 4/4-1.py View File

@ -0,0 +1,3 @@
score = int(input("Wat is je score: "))
if score >= 15:
print("Je bent geslaagd")

+ 16
- 0
les 4/4-2.py View File

@ -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")

+ 18
- 0
les 4/4-3.py View File

@ -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")

+ 15
- 0
les 4/4-4.py View File

@ -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])

+ 16
- 0
les 4/4-5.py View File

@ -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)

+ 16
- 0
les 4/4-6.py View File

@ -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)

Loading…
Cancel
Save