forked from curio-lesmateriaal/rollercoaster-check
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
40 lines (33 loc) · 939 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import lib_coasterimg as coasterimg
import time
import os
#Read check values
file1 = open("rules/age.txt", "r")
age_check = int(file1.read())
file1.close()
file2 = open("rules/height.txt", "r")
height_check = int(file2.read())
file2.close()
running = True
while running:
#Get inputs
os.system('cls')
print("Rollercoaster-check™")
age = input("Voer leeftijd in: ")
height = input("Voer lengte in: ")
age = int(age)
height = int(height)
#Process checks
if(age > age_check and height > height_check):
os.system('cls')
print("Stap maar in!")
print(coasterimg.get())
time.sleep(3)
else:
os.system('cls')
print("Je voldoet niet aan de voorwaarden...")
print(coasterimg.sad())
time.sleep(1)
result = input("Druk op Enter om nog een keer te checken, of X om te stoppen\n\n")
if(result.upper() == "X"):
running = False