Ver a proveniência

Uploading school assignment

master
Marcel Haazen há 5 anos
ascendente
cometimento
0b3aad3bfb
8 ficheiros alterados com 104 adições e 5 eliminações
  1. +35
    -3
      Final Assignment/FA-1.py
  2. +19
    -0
      Les 5/5-3.py
  3. +17
    -1
      Les 5/5-4.py
  4. +11
    -1
      Les 5/5-5.py
  5. BIN
      Untitled Diagram (2).png
  6. BIN
      Untitled Diagram (3).png
  7. +16
    -0
      les 6/6-2.py
  8. +6
    -0
      les 6/kaartnummers.txt

+ 35
- 3
Final Assignment/FA-1.py Ver ficheiro

@ -4,9 +4,10 @@
#author :Marcel Haazen
#email :marcel@haazen.xyz
#date :23-09-2019 - 11:53
#edit_date :27-09-2019 - 23:25
#version :0.1
#usage :python3 FA-1.py
#notes :
#notes :Sorry als het wat gehaast is, en laat heb het snel gemaakt vanuit bed me bijholteontsteking dus wou het snel maken
#python_version :3.7.4
#==============================================================================
@ -24,6 +25,37 @@ def standaardtarief(afstandKM):
price = round(afstandKM * 0.8, 2)
return price
ritprijs
def ritprijs(leeftijd,weekendrit,afstandKM):
basis = standaardtarief(afstandKM)
if weekendrit == True:
if leeftijd < 12 or leeftijd >= 65:
prijs = basis*0.65
else:
prijs = basis*0.6
else:
if leeftijd < 12 or leeftijd >= 65:
prijs = basis*0.7
else:
prijs = basis
return round(prijs,2)
print(ritprijs(11,True,14))
print(ritprijs(12,True,14))
print(ritprijs(64,True,14))
print(ritprijs(65,True,14))
print(ritprijs(11,False,14))
print(ritprijs(12,False,14))
print(ritprijs(64,False,14))
print(ritprijs(65,False,14))
print(ritprijs(11,True,51))
print(ritprijs(12,True,51))
print(ritprijs(64,True,51))
print(ritprijs(65,True,51))
print(standaardtarief(25))
print(ritprijs(11,False,51))
print(ritprijs(12,False,51))
print(ritprijs(64,False,51))
print(ritprijs(65,False,51))

+ 19
- 0
Les 5/5-3.py Ver ficheiro

@ -1,11 +1,30 @@
#!/usr/bin/env python3
#title :5-3.py
<<<<<<< HEAD
#description :Opdracht 5.3 - Functie met drie parameters
#author :Marcel Haazen
#email :marcel@haazen.xyz
#date :21-09-2019 - 23:54
=======
#description :Opdracht 5.3 - Functie met if
#author :Marcel Haazen
#email :marcel@haazen.xyz
#date :22-09-2019 - 13:40
>>>>>>> Add assignments
#version :0.1
#usage :python3 5-3.py
#notes :
#python_version :3.7.4
#==============================================================================
<<<<<<< HEAD
=======
def lang_genoeg(length):
if length >= 120:
print("Je bent lang genoeg voor de attractie!")
else:
print("Sorry, je bent te klein!")
lang_genoeg(119)
lang_genoeg(120)
>>>>>>> Add assignments

+ 17
- 1
Les 5/5-4.py Ver ficheiro

@ -3,6 +3,7 @@
#description :Opdracht 5.4 - Functie met if
#author :Marcel Haazen
#email :marcel@haazen.xyz
<<<<<<< HEAD
#date :23-09-2019 - 11:10
#version :0.1
#usage :python3 5-4.py
@ -12,8 +13,23 @@
def new_password(oldpassword, newpassword):
if (newpassword != oldpassword) and (len(newpassword) >= 6) and (any(char.isdigit() for char in newpassword) == True):
=======
#date :22-09-2019 - 13:50
#version :0.1
#usage :python3 5-4.py
#notes : Optionele opdracht ook gedaan
#python_version :3.7.4
#==============================================================================
def new_password(oldpassword,newpassword):
if (newpassword.lower() != oldpassword.lower()) and (len(newpassword) >= 6) and (any(char.isdigit() for char in newpassword) == True):
>>>>>>> Add assignments
print(True)
else:
print(False)
new_password("Hogeschool", "Utrecht1")
<<<<<<< HEAD
new_password("Hogeschool", "Utrecht1")
=======
new_password("Hogeschool","Utrecht1")
>>>>>>> Add assignments

+ 11
- 1
Les 5/5-5.py Ver ficheiro

@ -3,7 +3,11 @@
#description :Opdracht 5.5 - Functie met list-parameter en for-loop
#author :Marcel Haazen
#email :marcel@haazen.xyz
<<<<<<< HEAD
#date :23-09-2019 - 11:20
=======
#date :22-09-2019 - 14:10
>>>>>>> Add assignments
#version :0.1
#usage :python3 5-5.py
#notes :
@ -14,7 +18,13 @@ def kwadraten_som(grondgetallen):
s = 0
for number in grondgetallen:
if number > 0:
<<<<<<< HEAD
s = s +(number*number)
print(s)
kwadraten_som([4,5,3,-81])
kwadraten_som([4,5,3,-81])
=======
s = s + (number*number)
print(s)
kwadraten_som([4, 5, 3, -81 ])
>>>>>>> Add assignments

BIN
Untitled Diagram (2).png Ver ficheiro

Antes Depois
Largura: 373  |  Altura: 364  |  Tamanho: 20 KiB

BIN
Untitled Diagram (3).png Ver ficheiro

Antes Depois
Largura: 703  |  Altura: 942  |  Tamanho: 86 KiB

+ 16
- 0
les 6/6-2.py Ver ficheiro

@ -0,0 +1,16 @@
#!/usr/bin/env python3
#title :6-2.py
#description :Opdracht 6.2 - Files Lezen
#author :Marcel Haazen
#email :marcel@haazen.xyz
#date :03-10-2019 - 13:28
#version :0.1
#usage :python3 6-2.py
#notes :
#python_version :3.7.4
#==============================================================================
file = open("kaartnummers.txt", "r")
for line in file:
fields = line.split(", ")
print(fields[1] + "Heeft kaartnummer:" + fields[0])

+ 6
- 0
les 6/kaartnummers.txt Ver ficheiro

@ -0,0 +1,6 @@
325255, Jan Jansen
334343, Erik Materus
235434, Ali Ahson
645345, Eva Versteeg
534545, Jan de Wilde
345355, Henk de Vries

Carregando…
Cancelar
Guardar