-
Notifications
You must be signed in to change notification settings - Fork 340
Expand file tree
/
Copy path16_sorting_hat_3.py
More file actions
69 lines (60 loc) · 1.45 KB
/
16_sorting_hat_3.py
File metadata and controls
69 lines (60 loc) · 1.45 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
Gryffindor = 0
Ravenclaw = 0
Hufflepuff = 0
Slytherin = 0
#question no.1
print('********** question 1 ***********')
print('Q1) Do you like Dawn or Dusk?')
print("1) Dawn")
print("2) Dusk")
ans = int(input('enter your ans(1,2):'))
if ans ==1:
Gryffindor = Gryffindor+1
Ravenclaw = Ravenclaw+1
elif ans==2:
Hufflepuff = Hufflepuff+1
Slytherin = Slytherin+1
else :
print("Wrong input")
#question no.2
print('********** question 2 ***********')
print('Q2) When I’m dead, I want people to remember me as:')
print("1) The Good")
print("2) The Great")
print("3) The Wise")
print("4) The Bold")
ans = int(input('enter your answer (1-4):'))
if ans == 1:
Hufflepuff = Hufflepuff+2
elif ans == 2:
Slytherin = Slytherin+2
elif ans == 3:
Ravenclaw = Ravenclaw+2
elif ans == 4:
Gryffindor = Gryffindor+2
else :
print("Wrong input")
#question no.3
print('********** question 3 ***********')
print('Q3) Which kind of instrument most pleases your ear?:')
print("1) The violin")
print("2) The trumpet")
print("3) The piano")
print("4) The drum")
ans = int(input('enter your answer (1-4):'))
if ans == 1:
Slytherin = Slytherin+4
elif ans == 2:
Hufflepuff = Hufflepuff+4
elif ans == 3:
Ravenclaw = Ravenclaw+4
elif ans == 4:
Gryffindor = Gryffindor+4
else :
print("Wrong input")
#score
print('**** total score of each house ****')
print(f'Gryffindor:{Gryffindor}')
print(f'Ravenclaw:{Ravenclaw}')
print(f'Hufflepuff:{Hufflepuff}')
print(f'Slytherin:{Slytherin}')