Skip to content

Commit 005aa54

Browse files
authored
Update sorting_hat.py
1 parent e916e9e commit 005aa54

1 file changed

Lines changed: 25 additions & 25 deletions

File tree

‎3-control-flow/sorting_hat.py‎

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
ravenclaw = 0
77
slytherin = 0
88

9-
print("===============")
10-
print("The Sorting Hat")
11-
print("===============")
9+
print('===============')
10+
print('The Sorting Hat')
11+
print('===============')
1212

1313
# ~~~~~~~~~~~~~~~ Question 1 ~~~~~~~~~~~~~~~
1414

15-
print("Q1) Do you like Dawn or Dusk?")
15+
print('Q1) Do you like Dawn or Dusk?')
1616

17-
print(" 1) Dawn")
18-
print(" 2) Dusk")
17+
print(' 1) Dawn')
18+
print(' 2) Dusk')
1919

20-
answer = int(input("Enter answer (1-2): "))
20+
answer = int(input('Enter answer (1-2): '))
2121

2222
if answer == 1:
2323
gryffindor += 1
@@ -26,18 +26,18 @@
2626
hufflepuff += 1
2727
slytherin +=1
2828
else:
29-
print("Wrong input.")
29+
print('Wrong input.')
3030

3131
# ~~~~~~~~~~~~~~~ Question 2 ~~~~~~~~~~~~~~~
3232

3333
print("\nQ2) When I'm dead, I want people to remember me as:")
3434

35-
print(" 1) The Good")
36-
print(" 2) The Great")
37-
print(" 3) The Wise")
38-
print(" 4) The Bold")
35+
print(' 1) The Good')
36+
print(' 2) The Great')
37+
print(' 3) The Wise')
38+
print(' 4) The Bold')
3939

40-
answer = int(input("Enter your answer (1-4): "))
40+
answer = int(input('Enter your answer (1-4): '))
4141

4242
if answer == 1:
4343
hufflepuff += 1
@@ -48,18 +48,18 @@
4848
elif answer == 4:
4949
gryffindor +=1
5050
else:
51-
print("Wrong input.")
51+
print('Wrong input.')
5252

5353
# ~~~~~~~~~~~~~~~ Question 3 ~~~~~~~~~~~~~~~
5454

55-
print("\nQ3) Which kind of instrument most pleases your ear?")
55+
print('\nQ3) Which kind of instrument most pleases your ear?')
5656

57-
print(" 1) The violin")
58-
print(" 2) The trumpet")
59-
print(" 3) The piano")
60-
print(" 4) The drum")
57+
print(' 1) The violin')
58+
print(' 2) The trumpet')
59+
print(' 3) The piano')
60+
print(' 4) The drum')
6161

62-
answer = int(input("Enter your answer (1-4): "))
62+
answer = int(input('Enter your answer (1-4): '))
6363

6464
if answer == 1:
6565
slytherin +=1
@@ -70,18 +70,18 @@
7070
elif answer == 4:
7171
gryffindor +=1
7272
else:
73-
print("Wrong input.")
73+
print('Wrong input.')
7474

7575
print(gryffindor)
7676
print(ravenclaw)
7777
print(hufflepuff)
7878
print(slytherin)
7979

8080
if gryffindor >= ravenclaw and gryffindor >= hufflepuff and gryffindor >= slytherin:
81-
print("🦁 Gryffindor!")
81+
print('🦁 Gryffindor!')
8282
elif ravenclaw >= hufflepuff and ravenclaw >= slytherin:
83-
print("🦅 Ravenclaw!")
83+
print('🦅 Ravenclaw!')
8484
elif hufflepuff >= slytherin:
85-
print("🦡 Hufflepuff!")
85+
print('🦡 Hufflepuff!')
8686
else:
87-
print("🐍 Slytherin!")
87+
print('🐍 Slytherin!')

0 commit comments

Comments
 (0)