/
Question2.py
38 lines (29 loc) · 1 KB
/
Question2.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
# Greta's Quiz Game
from matplotlib.pyplot import imshow
import numpy as np
from PIL import Image
number = 2
#--Cool Image to show if they answer the question Right
pil_im = Image.open('door2.png', 'r')
imshow(np.asarray(pil_im))
imshow(pil_im)
#--The Question and Answer Pairs
print('The two main types of deafness are...?\n\n')
print('A. old deafness and young deafness\n')
print('B. conduction deafness and nerve deafness\n')
print('C. happy deafness and sad deafness \n')
print('D. genetic deafness and non genetic deafness\n')
#--Correct Answer
answer = 'B'
#--Link to learn more
url = "http://school.eb.com/levels/high/article/deafness/29631"
#--Boolean
understand_deafness=False
#--While loop
while not understand_deafness:
guess = input('A, B, C, or D?\n\n\n')
if guess == answer:
print('Correct! Great Job! You Just Passed Through Door # {}!'.format(number))
understand_deafness=True
else:
print('\nSorry, Try Again! Go Here For a Clue: {}'.format(url))